[Aptitude-devel] Bug#782777: Cause for #782777 (recent "aptitude forget-new" issues) is likely the fix for #777760 in apt 1.0.9.8 (was: Re: Bug#782777: aptitude: "forget-new" option doesn't work)

Axel Beckert abe at debian.org
Tue Apr 21 12:23:43 UTC 2015


Hi,

TL;DR: 

I think I found the source of the issue for #782777 and friends in
aptitude: I believe it's the fix for #777760 included in apt 1.0.9.8.

I at least can prove that downgrading apt to 1.0.9.7 plus running
"apt-get update" makes the issue(s) vanish.

Scroll down to "So the architecture looks fine here" and read from
there on if you're only interested in the (pure apt) evidence, but not
the way how I found it.

The middle part of the mail shows how I came to this conclusion.

Axel Beckert wrote:
> > On that system, the problem persits after disabling all the third-party
> > repositories, leaving only sid sources list.
> 
> Interesting, thanks for that fact. Did you do an "apt-get update" or
> equivalent after removing the 3rd party repos?
> 
> I'll try the same with some of my machines.

I tried that one of my machines (with "apt-get update" after editing
the sources.list) and it did indeed make a difference and make the
symptom vanish.

Reenabling these other repositoroies, and running "apt-get update"
made them re-appear.

Another thing I noticed is that yet another property of these packages
gets lost: scheduled actions for these packages.

I.e. if I select libgnutls26 in aptitude's TUI for installation and
then just quit aptitude instead of pressing "g" twice, and reenter
aptitude's TUI, the scheduled action "install" is no more scheduled,
either.

But trying to reproduce the above example purely on the commandline
interestingly failed with the following error message -- and that may
give a hint what goes wrong:

# dpkg --print-architecture 
amd64
# dpkg --print-foreign-architectures
# aptitude search '?new'
p   libgnutls26   - GNU TLS library - runtime library
# aptitude forget-new
# aptitude search '?new'
p   libgnutls26   - GNU TLS library - runtime library
# apt-cache policy libgnutls26
libgnutls26:
  Installed: (none)
  Candidate: 2.12.23-18
  Version table:
     2.12.23-18 0
        210 http://ftp.ch.debian.org/debian/ experimental/main amd64 Packages
# aptitude install --schedule-only libgnutls26
No candidate version found for libgnutls26:i386
No candidate version found for libgnutls26:i386
#

So why the heck does libgnutls26:i386 suddenly appear on a
non-multi-arch system? (It may have had i386 enabled as foreign
architecture in the past, though. No more sure.)

Ok, so let's make clear that we want the amd64 version:

# aptitude install --schedule-only libgnutls26:amd64
No candidate version found for libgnutls26:i386
No candidate version found for libgnutls26:i386
#

(Removing the --schedule-only doesn't make a difference with regards
to the architecture messages.)

Ok, let's ignore aptitude's features and lets try with apt-get:

# apt-get install -s libgnutls26
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libgnutls26:i386
Conf libgnutls26:i386
# apt-get install -s libgnutls26:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libgnutls26:i386
Conf libgnutls26:i386
#

WTF?

Let's check the downloaded Packages lists:

grep-aptavail 'Package: libgnutls26' 
Package: libgnutls26
Source: gnutls26
Version: 2.12.23-18
Installed-Size: 1385
Maintainer: Debian GnuTLS Maintainers <pkg-gnutls-maint at lists.alioth.debian.org>
Architecture: amd64
Replaces: gnutls0, gnutls0.4, gnutls3
Depends: libc6 (>= 2.14), libgcrypt20 (>= 1.6.1), libp11-kit0 (>= 0.11), libtasn1-6 (>= 4.1-0), zlib1g (>= 1:1.1.4)
Pre-Depends: multiarch-support
Conflicts: gnutls0, gnutls0.4
Breaks: ccbuild (<= 2.0.1-1), csync2 (<= 1.34-2.2), freewheeling (<= 0.6-1.1), gkrellm (<= 2.3.4-1), libsoup2.4-1 (= 2.31.2-1), libsoup2.4-1 (<= 2.30.1-1), macopix-gtk2 (<= 1.7.4-3), pokerth (<= 0.8.3-3+b1), pokerth-server (<= 0.8.3-3+b1), sipsak (<= 0.9.6-2.1), slrn (<= 1.0.0~pre18-1.1), slrnpull (<= 1.0.0~pre18-1.1), snowdrop (<= 0.02b-9), ssmtp (<= 2.64-4), tf5 (<= 5.0beta8-4), wput (<= 0.6.2-2), zoneminder (<= 1.24.4-1)
Description: GNU TLS library - runtime library
Multi-Arch: same
Homepage: http://www.gnutls.org/
Description-md5: 07e0914117156d2b3fcf0d63e9ef8ac2
Tag: implemented-in::c, implemented-in::c++, role::shared-lib
Section: libs
Priority: standard
Filename: pool/main/g/gnutls26/libgnutls26_2.12.23-18_amd64.deb
Size: 534362
MD5sum: 781c367990e74fb756611748a2ef4a0b
SHA1: 07b17ff88734cc2dce0b33496d1aaf30caec1b4c
SHA256: ab272158ae2d841e5f9b8450d41897b846ecd7eaed2664248a66e315ea2d3359

Package: libgnutls26-dbg
Source: gnutls26
Version: 2.12.23-18
Installed-Size: 3027
Maintainer: Debian GnuTLS Maintainers <pkg-gnutls-maint at lists.alioth.debian.org>
Architecture: amd64
Depends: libgnutls26 (= 2.12.23-18), libc6 (>= 2.15), libgcrypt20 (>= 1.6.0), libp11-kit0 (>= 0.11), libtasn1-6 (>= 4.1-0), zlib1g (>= 1:1.1.4)
Description: GNU TLS library - debugger symbols
Multi-Arch: same
Homepage: http://www.gnutls.org/
Description-md5: 49ef95a26f6727eeaa8d2c979d728b2d
Tag: role::debug-symbols
Section: debug
Priority: extra
Filename: pool/main/g/gnutls26/libgnutls26-dbg_2.12.23-18_amd64.deb
Size: 1520110
MD5sum: 2d52cfc54fe36704267bc6c9daf0915a
SHA1: fe2346ce812fcc96c1c1ecfbe6a2625da9b6bf1e
SHA256: 69cb3ba3c51b645704b571a91bfeab3eaa7263b190fced310e11095b4d7c0b76

So the architecture looks fine here.

Ok, another try:

# apt-get install -s libgnutls26:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst libgnutls26:i386
Conf libgnutls26:i386
# apt-get install libgnutls26:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/534 kB of archives.
After this operation, 1.418 kB of additional disk space will be used.
Selecting previously unselected package libgnutls26:amd64.
(Reading database ... 216125 files and directories currently installed.)
Preparing to unpack .../libgnutls26_2.12.23-18_amd64.deb ...
Unpacking libgnutls26:amd64 (2.12.23-18) ...
Setting up libgnutls26:amd64 (2.12.23-18) ...
Processing triggers for libc-bin (2.19-18) ...
#

So why does apt-get say "i386" upon "-s" while it works as expected
(installing libgnutls26 of architecture amd64) if I remove the "-s"?

(I suspect that this architecture mixup is what confuses aptitude.)

So I've downgraded apt and all other installed packages from the apt
source package to 1.0.9.7 from
http://snapshot.debian.org/package/apt/1.0.9.7/ again.

Running "apt-get install -s libgnutls26:amd64" again without having
run "apt-get update" shows the same symptom again:

# apt-get install -s libgnutls26:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Inst libgnutls26:i386
Conf libgnutls26:i386
#

But after having run "apt-get update" (which rebuilds the binary cache
files, thanks to David for that information), this changes a lot:

# apt-get install -s libgnutls26:amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libgnutls26
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Inst libgnutls26 (2.12.23-18 Debian:experimental [amd64])
Conf libgnutls26 (2.12.23-18 Debian:experimental [amd64])
#

So the source of this issue is very likely one of the changes in apt
1.0.9.8, needs a reset of the package list cache to show up. And it is
multi-arch related, even on single-arch systems.

Which again sounds a lot like the fix for "parse specific-arch
dependencies correctly on single-arch systems"
(https://bugs.debian.org/777760), i.e. this commit:
https://anonscm.debian.org/cgit/apt/apt.git/commit/?id=596ec43ce34421080a58b28299c1ed9cb0dbaa25

Prove that downgrading apt + running "apt-get update" this also fixes
the aptitude issue(s) on the system where I ran these tests:

# aptitude search '?new'
p   libgnutls26   - GNU TLS library - runtime library                                               
# aptitude forget-new
# aptitude search '?new'
# aptitude install --schedule-only libgnutls26:amd64
# aptitude install
The following NEW packages will be installed:
  libgnutls26 
0 packages upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/534 kB of archives. After unpacking 1.418 kB will be used.
Do you want to continue? [Y/n/?] ^C
#

So if there's no opposition, I'd reassign this issue to apt (with
"affects aptitude") and maybe raise its severity to at least
important. (Feel free to do so yourself if you agree. :-)

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Aptitude-devel mailing list