[Aptitude-devel] Bug#537735: Aptitude clearing "automatically installed" flag

Mr Allwyn Fernandes dbwerwesklsdf at stobor.net
Wed Jun 13 04:01:48 BST 2012


Package: aptitude
Version: 0.6.7-1

I just noticed this happening, and so I've produced a simple test case. It appears that the information is being lost at the purge step, not the cancel step. Also, 
a quick search turns up bug#432017 which looks like a related issue occuring on upgrade.

I hope this example is clear enough; I've picked a package that most people probably don't have installed, so it can be used as is...

If there are any further questions, I'm happy to help.

Cheers.

Step 1: pick a package which is not installed, and has a not-installed dependency:
==================================================================================

(I don't use a YubiKey, so this was a convenient example)

root at localhost:~# aptitude show libykpers-1-1 
...
Depends: libc6 (>= 2.4), libusb-1.0-0 (>= 2:1.0.8), libyubikey0 (>= 1.5)
...

root at localhost:~# aptitude versions '?exact-name(libc6)' '?exact-name(libusb-1.0-0)' libyubikey0 libykpers-1-1
Package libc6:
i   2.13-32						100
p   2.13-33			testing			990

Package libusb-1.0-0:
i A 2:1.0.9-1			testing			990

Package libykpers-1-1:
p   1.6.4-1			testing			990

Package libyubikey0:
p   1.8-1			testing			990


Step 2: Install the package, which will automatically install the dependency:
=============================================================================


root at localhost:~# aptitude install libykpers-1-1
The following NEW packages will be installed:
  libykpers-1-1 [1.6.4-1]  libyubikey0{a} [1.8-1] (D: libykpers-1-1)
0 packages upgraded, 2 newly installed, 0 to remove and 903 not upgraded.
Need to get 47.2 kB of archives. After unpacking 141 kB will be used.
Do you want to continue? [Y/n/?] 
Get: 1 http://mirror.example.com/pub/debian/ testing/main libyubikey0 i386 1.8-1 [9,544 B]
Get: 2 http://mirror.example.com/pub/debian/ testing/main libykpers-1-1 i386 1.6.4-1 [37.6 kB]
Fetched 47.2 kB in 1s (25.5 kB/s)
Selecting previously unselected package libyubikey0.
(Reading database ... 492935 files and directories currently installed.)
Unpacking libyubikey0 (from .../libyubikey0_1.8-1_i386.deb) ...
Selecting previously unselected package libykpers-1-1:i386.
Unpacking libykpers-1-1:i386 (from .../libykpers-1-1_1.6.4-1_i386.deb) ...
Setting up libyubikey0 (1.8-1) ...
Setting up libykpers-1-1:i386 (1.6.4-1) ...


Step 3: Observe that the dependency is marked auto:
===================================================

root at localhost:~# aptitude versions '?exact-name(libc6)' '?exact-name(libusb-1.0-0)' libyubikey0 libykpers-1-1
Package libc6:
i   2.13-32						100
p   2.13-33			testing			990

Package libusb-1.0-0:
i A 2:1.0.9-1			testing			990

Package libykpers-1-1:
i   1.6.4-1			testing			990

Package libyubikey0:
i A 1.8-1			testing			990


Step 4: Fire up aptitude, and mark the original package for purging:
====================================================================

root at localhost:~# aptitude

  /              to search
  ykp[Enter]     to select the libykpers-1-1 package
  _              to mark for purge
  q[Enter]       to quit aptitude



Step 5: Observe that original package and dependency are marked for purge, but not marked auto:
===============================================================================================


root at localhost:~# aptitude versions '?exact-name(libc6)' '?exact-name(libusb-1.0-0)' libyubikey0 libykpers-1-1
Package libc6:
i   2.13-32						100
p   2.13-33			testing			990

Package libusb-1.0-0:
i A 2:1.0.9-1			testing			990

Package libykpers-1-1:
ip  1.6.4-1			testing			990

Package libyubikey0:
ip  1.8-1			testing			990


Step 4: Fire up aptitude, and cancel pending actions:
=====================================================

root at localhost:~# aptitude

  [Ctrl-T]->Actions->Cancel pending actions
  q[Enter]       to quit aptitude
  

Step 5: Observe that dependency is not marked auto:
===================================================


root at localhost:~# aptitude versions '?exact-name(libc6)' '?exact-name(libusb-1.0-0)' libyubikey0 libykpers-1-1
Package libc6:
i   2.13-32						100
p   2.13-33			testing			990

Package libusb-1.0-0:
i A 2:1.0.9-1			testing			990

Package libykpers-1-1:
i   1.6.4-1			testing			990

Package libyubikey0:
i   1.8-1			testing			990





-- Package-specific info:
Terminal: xterm
$DISPLAY is set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.6.7 compiled at May  5 2012 03:07:17
Compiler: g++ 4.6.3
Compiled against:
  apt version 4.12.0
  NCurses version 5.9
  libsigc++ version: 2.2.10
  Ept support enabled.
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 5.9.20110404
  cwidget version: 0.5.16
  Apt version: 4.12.0

aptitude linkage:
        linux-gate.so.1 =>  (0xb77cc000)
        libapt-pkg.so.4.12 => /usr/lib/i386-linux-gnu/libapt-pkg.so.4.12 (0xb7253000)
        libncursesw.so.5 => /lib/i386-linux-gnu/libncursesw.so.5 (0xb7221000)
        libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xb7200000)
        libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0xb71fb000)
        libcwidget.so.3 => /usr/lib/libcwidget.so.3 (0xb70fa000)
        libept.so.1.0.5.4.12 => /usr/lib/libept.so.1.0.5.4.12 (0xb70aa000)
        libxapian.so.22 => /usr/lib/sse2/libxapian.so.22 (0xb6ec2000)
        libz.so.1 => /usr/lib/i386-linux-gnu/libz.so.1 (0xb6eaa000)
        libsqlite3.so.0 => /usr/lib/i386-linux-gnu/libsqlite3.so.0 (0xb6e02000)
        libboost_iostreams.so.1.49.0 => /usr/lib/libboost_iostreams.so.1.49.0 (0xb6deb000)
        libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb6dd2000)
        libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6ce6000)
        libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb6cbf000)
        libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6ca2000)
        libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb6b45000)
        libutil.so.1 => /lib/i386-linux-gnu/i686/cmov/libutil.so.1 (0xb6b41000)
        libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb6b3d000)
        libbz2.so.1.0 => /lib/i386-linux-gnu/libbz2.so.1.0 (0xb6b2c000)
        libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xb6b26000)
        librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb6b1d000)
        /lib/ld-linux.so.2 (0xb77cd000)

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aptitude depends on:
ii  libapt-pkg4.12            0.9.3
ii  libboost-iostreams1.49.0  1.49.0-3
ii  libc6                     2.13-32
ii  libcwidget3               0.5.16-3.2
ii  libept1.4.12              1.0.6.1
ii  libgcc1                   1:4.7.0-8
ii  libncursesw5              5.9-7
ii  libsigc++-2.0-0c2a        2.2.10-0.1
ii  libsqlite3-0              3.7.11-3
ii  libstdc++6                4.7.0-8
ii  libtinfo5                 5.9-7
ii  libxapian22               1.2.10-1
ii  zlib1g                    1:1.2.7.dfsg-1

Versions of packages aptitude recommends:
ii  apt-xapian-index                0.45
ii  aptitude-doc-en [aptitude-doc]  0.6.7-1
ii  libparse-debianchangelog-perl   1.2.0-1
ii  sensible-utils                  0.0.7

Versions of packages aptitude suggests:
ii  debtags  1.9+b1
ii  tasksel  3.09






More information about the Aptitude-devel mailing list