Debian Bug report logs - #676496
dpkg: premature removal of "Multi-arch:" leads to all dpkg commands failing

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Adam Borowski <kilobyte@angband.pl>

Date: Thu, 7 Jun 2012 10:45:02 UTC

Severity: grave

Found in version dpkg/1.16.3

Fixed in version dpkg/1.16.4

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#676496; Package dpkg. (Thu, 07 Jun 2012 10:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to Adam Borowski <kilobyte@angband.pl>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Thu, 07 Jun 2012 10:45:09 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Adam Borowski <kilobyte@angband.pl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg: premature removal of "Multi-arch:" leads to all dpkg commands failing
Date: Thu, 07 Jun 2012 12:40:59 +0200
Package: dpkg
Version: 1.16.3
Severity: grave
Justification: renders package unusable

After an interrupted dpkg run, any subsequent invocation fails with:

dpkg: error: libc6-dev:armel <none> (Multi-Arch: no) is not co-installable
with libc6-dev which has multiple installed instances

This affects not only -i, --purge, --unpack but even -l or dpkg-query.

The last two relevant entries of dpkg/updates (there's over a hundred
entries after that, none mentioning libc6-dev) are:
,--====[ /var/lib/dpkg/updates/0005
Package: libc6-dev
Status: purge ok config-files
Priority: optional
Section: libdevel
Installed-Size: 8531
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: armel
Multi-Arch: same
Source: eglibc
Version: 2.13-33
Provides: libc-dev
Depends: libc6 (= 2.13-33), libc-dev-bin (= 2.13-33), linux-libc-dev
Recommends: gcc | c-compiler
Suggests: glibc-doc, manpages-dev
Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), libhwloc-dev (<< 1.2-3), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), make (<< 3.81-8.1), pkg-config (<< 0.26-1)
Conflicts: libc0.1-dev, libc0.3-dev, libc6.1-dev
Description: Embedded GNU C Library: Development Libraries and Header Files
 Contains the symlinks, headers, and object files needed to compile
 and link programs which use the standard C library.
Homepage: http://www.eglibc.org
`----

,--====[ /var/lib/dpkg/updates/0006
Package: libc6-dev
Status: unknown ok not-installed
Priority: optional
Section: libdevel
Architecture: armel
`----

/var/lib/dpkg/status includes:
,----
Package: libc6-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 10558
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: amd64
Multi-Arch: same
Source: eglibc
Version: 2.13-33
Provides: libc-dev
Depends: libc6 (= 2.13-33), libc-dev-bin (= 2.13-33), linux-libc-dev
Recommends: gcc | c-compiler
Suggests: glibc-doc, manpages-dev
Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<<
2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<<
4.6.0-12), libhwloc-dev (<< 1.2-3), libjna-java (<< 3.2.7-4), liblouis-dev
(<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), make (<< 3.81-8.1), pkg-config
(<< 0.26-1)
Conflicts: libc0.1-dev, libc0.3-dev, libc6.1-dev
Description: Embedded GNU C Library: Development Libraries and Header Files
 Contains the symlinks, headers, and object files needed to compile
 and link programs which use the standard C library.
Homepage: http://www.eglibc.org

Package: libc6-dev
Status: deinstall ok installed
Priority: optional
Section: libdevel
Installed-Size: 8531
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: armel
Multi-Arch: same
Source: eglibc
Version: 2.13-33
Provides: libc-dev
Depends: libc6 (= 2.13-33), libc-dev-bin (= 2.13-33), linux-libc-dev
Recommends: gcc | c-compiler
Suggests: glibc-doc, manpages-dev
Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<<
2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<<
4.6.0-12), libhwloc-dev (<< 1.2-3), libjna-java (<< 3.2.7-4), liblouis-dev
(<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), make (<< 3.81-8.1), pkg-config
(<< 0.26-1)
Conflicts: libc0.1-dev, libc0.3-dev, libc6.1-dev
Description: Embedded GNU C Library: Development Libraries and Header Files
 Contains the symlinks, headers, and object files needed to compile
 and link programs which use the standard C library.
Homepage: http://www.eglibc.org
`----

After manually appending "Multi-Arch: same" to the file in dpkg/updates (for
libc6-dev:armel and for another package from the same run), dpkg let me proceed.
This suggests a fix: don't remove the field until possibly some time later.

(I have a btrfs snapshot of the system, in case more information is needed.)


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (150, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
armel

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#676496; Package dpkg. (Thu, 07 Jun 2012 16:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Thu, 07 Jun 2012 16:33:03 GMT) (full text, mbox, link).


Message #10 received at 676496@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: Adam Borowski <kilobyte@angband.pl>, 676496@bugs.debian.org
Subject: Re: Bug#676496: dpkg: premature removal of "Multi-arch:" leads to all dpkg commands failing
Date: Thu, 7 Jun 2012 18:28:52 +0200
Hi!

On Thu, 2012-06-07 at 12:40:59 +0200, Adam Borowski wrote:
> Package: dpkg
> Version: 1.16.3
> Severity: grave
> Justification: renders package unusable

> After an interrupted dpkg run, any subsequent invocation fails with:
> 
> dpkg: error: libc6-dev:armel <none> (Multi-Arch: no) is not co-installable
> with libc6-dev which has multiple installed instances
> 
> This affects not only -i, --purge, --unpack but even -l or dpkg-query.
> 
> The last two relevant entries of dpkg/updates (there's over a hundred
> entries after that, none mentioning libc6-dev) are:

> ,--====[ /var/lib/dpkg/updates/0006
> Package: libc6-dev
> Status: unknown ok not-installed
> Priority: optional
> Section: libdevel
> Architecture: armel
> `----

> After manually appending "Multi-Arch: same" to the file in dpkg/updates (for
> libc6-dev:armel and for another package from the same run), dpkg let me proceed.
> This suggests a fix: don't remove the field until possibly some time later.

Hrm, I thought I had handled that case in the code correctly, but
apparently not. :/ It's really a problem that the update log is only
ever used on some interrupted runs, as that makes reliably testing it
quite difficult, I should add a way to test it in the future.

> (I have a btrfs snapshot of the system, in case more information is needed.)

No need, and thanks for the report, will be fixed in 1.16.4, being
finished right now.

thanks,
guillem




Added tag(s) pending. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Fri, 08 Jun 2012 07:51:31 GMT) (full text, mbox, link).


Message sent on to Adam Borowski <kilobyte@angband.pl>:
Bug#676496. (Fri, 08 Jun 2012 07:51:45 GMT) (full text, mbox, link).


Message #15 received at 676496-submitter@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: 676496-submitter@bugs.debian.org
Subject: Bug#676496 marked as pending
Date: Fri, 08 Jun 2012 07:39:04 +0000
tag 676496 pending
thanks

Hello,

Bug #676496 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=5ba5d34

---
commit 5ba5d341998646321dd7452febd15e8a780c7287
Author: Guillem Jover <guillem@debian.org>
Date:   Thu Jun 7 18:35:12 2012 +0200

    libdpkg: Defer Multi-Arch field reset to pkg_blank()
    
    When removing a package pkgbin_blank() is called and an entry written
    to the update log, which might make it unparseable if there's other
    Multi-Arch instances present for that package.
    
    Closes: #676496

diff --git a/debian/changelog b/debian/changelog
index dde6a45..d1fe124 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -64,6 +64,8 @@ dpkg (1.16.4) UNRELEASED; urgency=low
   * Always activate all path components for file triggers, this fixes file
     trigger handling for conffiles and dpkg-trigger invokations.
     Closes: #675613, #676061, #676062, #676107, #676118, #676122
+  * Do not reset Multi-Arch field in the update log when removing the package.
+    Closes: #676496
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).




Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Fri, 08 Jun 2012 08:53:11 GMT) (full text, mbox, link).


Notification sent to Adam Borowski <kilobyte@angband.pl>:
Bug acknowledged by developer. (Fri, 08 Jun 2012 08:53:11 GMT) (full text, mbox, link).


Message #20 received at 676496-close@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: 676496-close@bugs.debian.org
Subject: Bug#676496: fixed in dpkg 1.16.4
Date: Fri, 08 Jun 2012 08:48:11 +0000
Source: dpkg
Source-Version: 1.16.4

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.16.4_all.deb
  to main/d/dpkg/dpkg-dev_1.16.4_all.deb
dpkg_1.16.4.dsc
  to main/d/dpkg/dpkg_1.16.4.dsc
dpkg_1.16.4.tar.bz2
  to main/d/dpkg/dpkg_1.16.4.tar.bz2
dpkg_1.16.4_amd64.deb
  to main/d/dpkg/dpkg_1.16.4_amd64.deb
dselect_1.16.4_amd64.deb
  to main/d/dpkg/dselect_1.16.4_amd64.deb
libdpkg-dev_1.16.4_amd64.deb
  to main/d/dpkg/libdpkg-dev_1.16.4_amd64.deb
libdpkg-perl_1.16.4_all.deb
  to main/d/dpkg/libdpkg-perl_1.16.4_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 676496@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 07 Jun 2012 23:43:19 +0200
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source amd64 all
Version: 1.16.4
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 391818 580038 584141 629480 670897 671198 672408 673158 673305 673518 674674 674711 675613 675918 675947 676061 676062 676107 676118 676122 676262 676496
Changes: 
 dpkg (1.16.4) unstable; urgency=low
 .
   [ Guillem Jover ]
   * Deprecate compressing .deb files with lzma, by making dpkg-deb issue a
     warning, as the format has several deficiencies that have been addressed
     by upstream in xz. Although unpacking will be kept being supported to
     handle existing lzma compressed .deb files.
   * Add alternative changelog formats documentation from the policy manual
     to dpkg-parsechangelog(1). Closes: #584141
   * Add MiNT support to ostable and triplettable.
     Requested by Thorsten Glaser <tg@mirbsd.de>.
   * Add new frontend.txt file to dpkg-dev documenting some public interfaces
     for dpkg frontends. Closes: #670897
   * Clarify in dpkg(1) when --force-conf* options cause action.
     Suggested by Sven Joachim <svenjoac@gmx.de>. Closes: #391818
   * Add “gcc | c-compiler” to libdpkg-perl Suggests, due to Dpkg::Arch usage.
     Closes: #671198
   * Do not mask PIE from dpkg-buildflags on m68k, it appears to work now.
     Requested by Thorsten Glaser <tg@mirbsd.de>.
   * Remove deprecated support for PGP style signing command interface from
     dpkg-buildpackage.
   * Remove obsolete --udeb dpkg-scanpackages option.
   * Add arm64 support to cputable. Closes: #672408
     Thanks Wookey <wookey@wookware.org>.
   * Check parsed integers for invalid or no digit errors in start-stop-daemon
     and update-alternatives.
   * Check all parsed integers for out of range errors; i.e. that no negative
     values are allowed if not appropriate, and that no overflows occur.
     Closes: #580038
   * Switch start-stop-daemon(8) man page examples from /var/run to /run.
   * Do not obscure Dpkg::Source::Package ‘require’ errors with custom
     error message. Thanks to Thomas Adam <thomas.adam@smoothwall.net> and
     Jonathan Nieder <jrnieder@gmail.com>.
   * Add new Dpkg::Substvars::set_as_used() member function.
   * Rename Dpkg::Substvars no_warn() member function to mark_as_used(), keep
     the old name aliased to the new one producing a deprecation warning.
   * Add support for Build-Depends-Arch and Build-Conflicts-Arch fields, and
     a new -A option to dpkg-checkbuilddeps. Closes: #629480
     Thanks to Roger Leigh <rleigh@debian.org>.
   * Add support for “none” as a valid dpkg-deb compression strategy value.
     Closes: #674711
   * Clarify in dpkg(1) that the «dpkg -l» example only lists installed
     packages, and that to list available packages «dpkg-query --load-avail»
     has to be used instead. Closes: #673305
   * Clarify also in the dpkg(1) man page (already present in the dpkg.cfg(5)
     man page) the valid filenames for /etc/dpkg/dpkg.cfg.d/ fragment files.
     Closes: #674674
   * Fix start-stop-daemon to not follow symlinks when creating pidfiles.
     Thanks to Carsten Hey <carsten@debian.org>. Closes: #675918
   * Refactor the file locking logic into a new Dpkg::File module, and move
     the libfile-fcntllock-perl dependency from dpkg-dev to libdpkg-perl.
   * Demote the libfile-fcntllock-perl Depends to a Recommends by falling back
     to use flock based locking, because it being an XS module makes building
     a new perl package bumping the perl ABI impossible, as both packages
     become uninstallable. Thanks to Dominic Hargreaves <dom@earth.li>.
     Closes: #675947
   * Put an & before field_capitalize() calls in Dpkg::Control::Fields to
     fix a usege before declaration warning with perl 5.16. Closes: #676262
   * Do not warn in dpkg-divert on missing files list file for packages never
     installed before. Closes: #673518
   * Add support for liblzma to handle .xz and .lzma compressed files, and
     switch to it instead of using xz-utils. This removes the xz-utils
     Pre-Depends from dpkg. Thanks to Jonathan Nieder <jrnieder@gmail.com>.
   * Always activate all path components for file triggers, this fixes file
     trigger handling for conffiles and dpkg-trigger invokations.
     Closes: #675613, #676061, #676062, #676107, #676118, #676122
   * Do not reset Multi-Arch field in the update log when removing the package.
     Closes: #676496
   * Fix dpkg-split to honour the DPKG_ADMINDIR environment variable.
 .
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
   * French (Christian Perrier). Fixes a mistranslation and some
     inconsistencies reported by Vincent Danjean( thanks). Closes: #673158
Checksums-Sha1: 
 5354fc290240a94e172dfe318415adf634f972b2 1375 dpkg_1.16.4.dsc
 58cf8a56152ca5bd548c5c23384c2f9b0ded0949 5615914 dpkg_1.16.4.tar.bz2
 f790fe2e8c24a32916625ba0a388a17c0fe5fa50 654406 libdpkg-dev_1.16.4_amd64.deb
 a019620211886c8e1a1e390708135a6706f1891e 2365582 dpkg_1.16.4_amd64.deb
 ae83972f9a141e92634567ad175f3a94885c358f 1090908 dselect_1.16.4_amd64.deb
 7b9af99a7030b9c4dbb86841f77217d4dd33cf33 1138800 dpkg-dev_1.16.4_all.deb
 624f4b2d7fe002afc6c7b89d6da3c6af893ad66e 852554 libdpkg-perl_1.16.4_all.deb
Checksums-Sha256: 
 2b171d26b43fbb32d14a1669e6bd029ce190e5cd4f93b4a3ea58f79e21e3ac0a 1375 dpkg_1.16.4.dsc
 15a3745d1fafae1e152dbbd5c8d4d3902f1922f54feb85bd8ac3f68a022f222d 5615914 dpkg_1.16.4.tar.bz2
 e7a966d2ecbad1fa1ced3d9a96a69b4b877f6b545082be8fcc5d49313de8d9fb 654406 libdpkg-dev_1.16.4_amd64.deb
 88bde030e5ea1b676e3c2a655ad9fa56a2d190f255916a2a7c0e06365a5d69f9 2365582 dpkg_1.16.4_amd64.deb
 7ab4e528bfe8d5afc565b87ab0dd9e258b25b801ff0203b654c1b8d32a0ca7a3 1090908 dselect_1.16.4_amd64.deb
 e4bb87c780c2ae6c4d1f7340fcc9443ed0e80b978a8b885d496b1ece57373424 1138800 dpkg-dev_1.16.4_all.deb
 e33215c244249c1c08a032d53c05b05fdf6a8202b5c47fe66f4bdb019fe74b3e 852554 libdpkg-perl_1.16.4_all.deb
Files: 
 6d010ca5afa69303e9c77de3b0706d55 1375 admin required dpkg_1.16.4.dsc
 1c1b51add81404fa96e2fadab7d228b6 5615914 admin required dpkg_1.16.4.tar.bz2
 8acfb32fac40428b31dc0f05b71bb80e 654406 libdevel optional libdpkg-dev_1.16.4_amd64.deb
 278cec665f3548418907b1aa4a30c865 2365582 admin required dpkg_1.16.4_amd64.deb
 c6947e3a795de2587d7d03d571d5f045 1090908 admin optional dselect_1.16.4_amd64.deb
 2366e08425069dddd468b0f5d06c7152 1138800 utils optional dpkg-dev_1.16.4_all.deb
 2dd92fcfb65f8a5a52ef9ec57efb8d3b 852554 perl optional libdpkg-perl_1.16.4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk/RpN8ACgkQuW9ciZ2SjJtMXwCdEYHD3H6OBmpoypAXIXd59Ejq
xzMAn0BZQNJ2Pr0yjH1pquGhhLUChwOU
=V29p
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 07 Jul 2012 07:48:11 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 13 02:11:17 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.