Bug#1061478: apt: Internal Error, AutoRemover broke stuff, unmet dependencies: linux-headers-6.6.9-amd64

2024-01-25 Thread Wesley Schwengle



Hi,

TL;DR

One can currently reproduce this behavior on unstable by doing:

```
apt-get install linux-headers-6.6.9-amd64
dpkg -r --force-depends linux-image-6.6.9-amd64-unsigned
apt-get full-upgrade
```

You can fix it by either running:

```
apt-get remove linux-headers-6.6.9-amd64
# or
apt-mark auto linux-headers-6.6.9-amd64
# or but it doesn't make sense
apt --fix-broken install
```

I came across this scenario myself as well and on Reddit. This is my 
take on it.


Around the 11th, linux-image-6.6.9-amd64 was installed. And around the 
18th, linux-image-6.6.11-amd64. During the .9 install I saw similar 
things, I chose to keep everything as is. This caused me to keep running 
on the 6.6.8 kernel at the time.


I think something went wrong with the linux-headers-6.6.9-amd64 and/or 
linux-image-6.6.9-amd64 package. For instance, I didn't have the 
linux-headers-6.6.9-amd64 installed while I had 
linux-headers-6.6.8-amd64 and  linux-headers-6.6.11-amd64 installed. The 
package linux-image-6.6.9-amd64 isn't available in the repositories 
(anymore):


```
$ apt-cache policy linux-image-6.6.9-amd64
linux-image-6.6.9-amd64:
  Installed: (none)
  Candidate: (none)
  Version table:
 6.6.9-1 -1
100 /var/lib/dpkg/status
```

The dependency tree is sorta broken of 6.6.9. The headers have these 
dependencies:


```
$ apt-cache depends linux-headers-6.6.9-amd64
linux-headers-6.6.9-amd64
  Depends: linux-headers-6.6.9-common
 |Depends: linux-image-6.6.9-amd64
  Depends: linux-image-6.6.9-amd64-unsigned
  Depends: linux-kbuild-6.6.9
  Depends: gcc-13
```

Your linux-image-amd64 package depends on:
```
$ apt-cache depends linux-image-amd64
linux-image-amd64
  Depends: linux-image-6.6.13-amd64
```

So now one of your packages is broken. I think it is warrants a look 
into your /var/log/apt/history.log to try to figure out what happened to 
your linux-{image,headers}-* packages around the 11th, 18th and later on.


Cheers,
Wesley

--
Wesley Schwengle
E: wes...@schwengle.net



Bug#1061478: apt: Internal Error, AutoRemover broke stuff, unmet dependencies: linux-headers-6.6.9-amd64

2024-01-24 Thread greg
Package: apt
Version: 2.7.10
Severity: normal
X-Debbugs-Cc: gre...@gmx.de

Make update everey day (as sudo):

apt update
apt full-upgrade

mm, seems like the AutoRemover destroyed something which really
shouldn't happen. Please file a bug report against apt.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-headers-6.6.9-amd64 : Depends: linux-image-6.6.9-amd64 (= 6.6.9-1+b1)
but it is not installable or
  linux-image-6.6.9-amd64-unsigned (=
6.6.9-1+b1) but it is not going to be installed
E: Internal Error, AutoRemover broke stuff


-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "1";
APT::Install-Suggests "0";
APT::Sandbox "";
APT::Sandbox::User "_apt";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^firmware-linux.*";
APT::NeverAutoRemove:: "^linux-firmware$";
APT::NeverAutoRemove:: "^linux-image-[a-z0-9]*$";
APT::NeverAutoRemove:: "^linux-image-[a-z0-9]*-[a-z0-9]*$";
APT::VersionedKernelPackages "";
APT::VersionedKernelPackages:: "linux-.*";
APT::VersionedKernelPackages:: "kfreebsd-.*";
APT::VersionedKernelPackages:: "gnumach-.*";
APT::VersionedKernelPackages:: ".*-modules";
APT::VersionedKernelPackages:: ".*-kernel";
APT::Never-MarkAuto-Sections "";
APT::Never-MarkAuto-Sections:: "metapackages";
APT::Never-MarkAuto-Sections:: "tasks";
APT::Move-Autobit-Sections "";
APT::Move-Autobit-Sections:: "oldlibs";
APT::Update "";
APT::Update::Post-Invoke-Success "";
APT::Update::Post-Invoke-Success:: "/usr/bin/test -e 
/usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && 
/usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call 
--system --dest org.freedesktop.PackageKit --object-path 
/org/freedesktop/PackageKit --timeout 4 --method 
org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo 
> /dev/null";
APT::Update::Post-Invoke-Success:: "if /usr/bin/test -w /var/cache/swcatalog -a 
-e /usr/bin/appstreamcli; then appstreamcli refresh --source=os > /dev/null || 
true; fi";
APT::Architectures "";
APT::Architectures:: "amd64";
APT::Compressor "";
APT::Compressor::. "";
APT::Compressor::.::Name ".";
APT::Compressor::.::Extension "";
APT::Compressor::.::Binary "";
APT::Compressor::.::Cost "0";
APT::Compressor::zstd "";
APT::Compressor::zstd::Name "zstd";
APT::Compressor::zstd::Extension ".zst";
APT::Compressor::zstd::Binary "zstd";
APT::Compressor::zstd::Cost "60";
APT::Compressor::zstd::CompressArg "";
APT::Compressor::zstd::CompressArg:: "-19";
APT::Compressor::zstd::UncompressArg "";
APT::Compressor::zstd::UncompressArg:: "-d";
APT::Compressor::lz4 "";
APT::Compressor::lz4::Name "lz4";
APT::Compressor::lz4::Extension ".lz4";
APT::Compressor::lz4::Binary "false";
APT::Compressor::lz4::Cost "50";
APT::Compressor::gzip "";
APT::Compressor::gzip::Name "gzip";
APT::Compressor::gzip::Extension ".gz";
APT::Compressor::gzip::Binary "gzip";
APT::Compressor::gzip::Cost "100";
APT::Compressor::gzip::CompressArg "";
APT::Compressor::gzip::CompressArg:: "-6n";
APT::Compressor::gzip::UncompressArg "";
APT::Compressor::gzip::UncompressArg:: "-d";
APT::Compressor::xz "";
APT::Compressor::xz::Name "xz";
APT::Compressor::xz::Extension ".xz";
APT::Compressor::xz::Binary "xz";
APT::Compressor::xz::Cost "200";
APT::Compressor::xz::CompressArg "";
APT::Compressor::xz::CompressArg:: "-6";
APT::Compressor::xz::UncompressArg "";
APT::Compressor::xz::UncompressArg:: "-d";
APT::Compressor::bzip2 "";
APT::Compressor::bzip2::Name "bzip2";
APT::Compressor::bzip2::Extension ".bz2";
APT::Compressor::bzip2::Binary "bzip2";
APT::Compressor::bzip2::Cost "300";
APT::Compressor::bzip2::CompressArg "";
APT::Compressor::bzip2::CompressArg:: "-6";
APT::Compressor::bzip2::UncompressArg "";
APT::Compressor::bzip2::UncompressArg:: "-d";
APT::Compressor::lzma "";
APT::Compressor::lzma::Name "lzma";
APT::Compressor::lzma::Extension ".lzma";
APT::Compressor::lzma::Binary "xz";
APT::Compressor::lzma::Cost "400";
APT::Compressor::lzma::CompressArg "";
APT::Compressor::lzma::CompressArg:: "--format=lzma";
APT::Compressor::lzma::CompressArg:: "-6";
APT::Compressor::lzma::UncompressArg "";
APT::Compressor::lzma::UncompressArg:: "--format=lzma";
APT::Compressor::lzma::UncompressArg:: "-d";
Dir "/";
Dir::State "var/lib/apt";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::extended_states "extended_states";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::netrc "auth.conf";
Dir::Etc::netrcparts "auth.conf.d";
Dir::Etc::parts