Debian Bug report logs - #652063
When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg.

Reported by: Martin Pitt <mpitt@debian.org>

Date: Wed, 14 Dec 2011 15:09:02 UTC

Severity: normal

Tags: patch

Found in version dpkg/1.16.2~wipmultiarch

Fixed in version 1.16.2

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#652063; Package dpkg. (Wed, 14 Dec 2011 15:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 14 Dec 2011 15:09:05 GMT) Full text and rfc822 format available.

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

From: Martin Pitt <mpitt@debian.org>
To: Debian BTS Submit <submit@bugs.debian.org>
Cc: Steve Langasek <vorlon@debian.org>, Michael Vogt <michael.vogt@ubuntu.com>
Subject: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Wed, 14 Dec 2011 16:07:30 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg
Version: 1.16.1.2

Note that this is not actually in Debian yet, it's for
git://git.debian.org/users/hertzog/dpkg.git pu/multiarch/full.
But I'm filing it here because
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632555#20 referred to
it and to have an early warning before that dpkg branch lands in
Debian. If you consider that inappropriate, then please just close the
bug and sorry for the unnecessary noise then.

If you install the i386 and amd64 variant of a Multi-Arch: same
package which just has identical files on both architectures, dpkg
considers one architecture as completely replacing the other, marking
the package as uninstalled:

$ LANG= sudo apt-get install --reinstall libpthread-stubs0{,:i386} libpthread-stubs0-dev
[...]
Preparing to replace libpthread-stubs0 0.3-2.1ubuntu1 (using .../libpthread-stubs0_0.3-2.1ubuntu1_amd64.deb) ...
Unpacking replacement libpthread-stubs0 ...
(Noting disappearance of libpthread-stubs0:i386, which has been completely replaced.)
Selecting previously unselected package libpthread-stubs0:i386.
Unpacking libpthread-stubs0:i386 (from .../libpthread-stubs0_0.3-2.1ubuntu1_i386.deb) ...
Preparing to replace libpthread-stubs0-dev 0.3-2.1ubuntu1 (using .../libpthread-stubs0-dev_0.3-2.1ubuntu1_amd64.deb) ...
Unpacking replacement libpthread-stubs0-dev ...
dpkg: dependency problems prevent configuration of libpthread-stubs0-dev:
 libpthread-stubs0-dev depends on libpthread-stubs0 (= 0.3-2.1ubuntu1); however:
  Package libpthread-stubs0 is not configured yet.
dpkg: error processing libpthread-stubs0-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 libpthread-stubs0-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)

Note that I sometimes have to run the command twice for it to appear.

The multi-arch patch was applied in Debian's libpthread-stubs in
0.3-3, so that reproducer should work in sid just as well.

This happens for packages which are metapackages for others (like
libtag1c2a), or just empty on most architectures (like
libpthread-stubs0), so they can't be M-A: foreign as they have M-A:
same dependencies.

I think the "completely disappeared" logic should not apply in this
case.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#652063; Package dpkg. (Thu, 15 Dec 2011 09:39:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Thu, 15 Dec 2011 09:39:17 GMT) Full text and rfc822 format available.

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

From: Raphael Hertzog <hertzog@debian.org>
To: Martin Pitt <mpitt@debian.org>, 652063@bugs.debian.org
Cc: Steve Langasek <vorlon@debian.org>, Michael Vogt <michael.vogt@ubuntu.com>
Subject: Re: Bug#652063: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Thu, 15 Dec 2011 10:35:40 +0100
[Message part 1 (text/plain, inline)]
tags 652063 + patch
thanks

On Wed, 14 Dec 2011, Martin Pitt wrote:
> But I'm filing it here because
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632555#20 referred to
> it and to have an early warning before that dpkg branch lands in
> Debian. If you consider that inappropriate, then please just close the
> bug and sorry for the unnecessary noise then.
> 
> If you install the i386 and amd64 variant of a Multi-Arch: same
> package which just has identical files on both architectures, dpkg
> considers one architecture as completely replacing the other, marking
> the package as uninstalled:

Yeah, that's not correct. The attached patch should fix this. It's
untested though and it would be great if you could confirm that it works
as expected.

Guillem, feel free to close this bug as soon as you merged the fix
in your pu/multiarch/master. I have pushed it in my pu/multiarch/full for
now.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/
[patch (text/plain, attachment)]

Added tag(s) patch. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Thu, 15 Dec 2011 09:39:24 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#652063; Package dpkg. (Thu, 15 Dec 2011 10:39:18 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Thu, 15 Dec 2011 10:39:18 GMT) Full text and rfc822 format available.

Message #17 received at 652063@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 652063@bugs.debian.org, Steve Langasek <vorlon@debian.org>, Michael Vogt <michael.vogt@ubuntu.com>
Subject: Re: Bug#652063: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Thu, 15 Dec 2011 11:34:58 +0100
[Message part 1 (text/plain, inline)]
Hello Raphaël ,

Raphael Hertzog [2011-12-15 10:35 +0100]:
> Yeah, that's not correct. The attached patch should fix this. It's
> untested though and it would be great if you could confirm that it works
> as expected.

I just tested it, and it works perfectly. Many thanks!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#652063; Package dpkg. (Fri, 16 Dec 2011 09:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 16 Dec 2011 09:45:05 GMT) Full text and rfc822 format available.

Message #22 received at 652063@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Martin Pitt <mpitt@debian.org>, 652063@bugs.debian.org
Cc: Steve Langasek <vorlon@debian.org>, Michael Vogt <michael.vogt@ubuntu.com>
Subject: Re: Bug#652063: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Fri, 16 Dec 2011 10:40:56 +0100
[Message part 1 (text/plain, inline)]
On Thu, 15 Dec 2011, Raphael Hertzog wrote:
> Yeah, that's not correct. The attached patch should fix this. It's
> untested though and it would be great if you could confirm that it works
> as expected.

It turns out it was not enough as dpkg will try to disappear the packages
also when it installs other packages (that just happen to share some
directories with the M-A: same packages).

Here's an updated version of the patch. It's also more restrictive than
the former one since it will refuse to disappear M-A: same packages simply
due to their file sharing, but it will allow such disappearence for the
non M-A: same cases. It seemed logical to allow this in the spirit of
supporting cross-grades (overwriting a M-A: foreign package by one of
another arch can then automatically disappear the former one).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/
[patch (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#652063; Package dpkg. (Fri, 16 Dec 2011 09:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin Pitt <mpitt@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 16 Dec 2011 09:54:05 GMT) Full text and rfc822 format available.

Message #27 received at 652063@bugs.debian.org (full text, mbox):

From: Martin Pitt <mpitt@debian.org>
To: Raphael Hertzog <hertzog@debian.org>
Cc: 652063@bugs.debian.org, Steve Langasek <vorlon@debian.org>, Michael Vogt <michael.vogt@ubuntu.com>
Subject: Re: Bug#652063: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Fri, 16 Dec 2011 10:50:53 +0100
[Message part 1 (text/plain, inline)]
Martin Pitt [2011-12-15 11:34 +0100]:
> Raphael Hertzog [2011-12-15 10:35 +0100]:
> > Yeah, that's not correct. The attached patch should fix this. It's
> > untested though and it would be great if you could confirm that it works
> > as expected.
> 
> I just tested it, and it works perfectly. Many thanks!

For the record, seems I spoke too soon. While it works with the
original test case now

  sudo apt-get install --reinstall libpthread-stubs0{,:i386} libpthread-stubs0-dev

it still fails when you do it separately:

$ LANG= sudo apt-get install --reinstall libpthread-stubs0{,:i386} libpthread-stubs0-dev
[...]
The following NEW packages will be installed:
  libpthread-stubs0:i386
Preparing to replace libpthread-stubs0 0.3-2.1ubuntu1 (using .../libpthread-stubs0_0.3-2.1ubuntu1_amd64.deb) ...
Unpacking replacement libpthread-stubs0 ...
Selecting previously unselected package libpthread-stubs0:i386.
Unpacking libpthread-stubs0:i386 (from .../libpthread-stubs0_0.3-2.1ubuntu1_i386.deb) ...
Preparing to replace libpthread-stubs0-dev 0.3-2.1ubuntu1 (using .../libpthread-stubs0-dev_0.3-2.1ubuntu1_amd64.deb) ...
Unpacking replacement libpthread-stubs0-dev ...
Setting up libpthread-stubs0 (0.3-2.1ubuntu1) ...
Setting up libpthread-stubs0:i386 (0.3-2.1ubuntu1) ...
Setting up libpthread-stubs0-dev (0.3-2.1ubuntu1) ...

$ LANG= sudo apt-get install --reinstall libpthread-stubs0-dev
[...]
Preparing to replace libpthread-stubs0-dev 0.3-2.1ubuntu1 (using .../libpthread-stubs0-dev_0.3-2.1ubuntu1_amd64.deb) ...
Unpacking replacement libpthread-stubs0-dev ...
(Noting disappearance of libpthread-stubs0:i386, which has been completely replaced.)
Setting up libpthread-stubs0-dev (0.3-2.1ubuntu1) ...
The following package disappeared from your system as
all files have been overwritten by other packages:
  libpthread-stubs0
Note: This is done automatic and on purpose by dpkg.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
[signature.asc (application/pgp-signature, inline)]

No longer marked as found in versions dpkg/1.16.1.2. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sat, 24 Mar 2012 17:15:02 GMT) Full text and rfc822 format available.

Marked as found in versions dpkg/1.16.2~wipmultiarch. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Sat, 24 Mar 2012 17:15:03 GMT) Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Sat, 24 Mar 2012 17:27:03 GMT) Full text and rfc822 format available.

Notification sent to Martin Pitt <mpitt@debian.org>:
Bug acknowledged by developer. (Sat, 24 Mar 2012 17:27:03 GMT) Full text and rfc822 format available.

Message #36 received at 652063-done@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Martin Pitt <mpitt@debian.org>, 652063-done@bugs.debian.org
Subject: Re: Bug#652063: When installing Multi-Arch: same (meta-)package for two architectures, dpkg considers one arch as completely disappeared
Date: Sat, 24 Mar 2012 18:24:49 +0100
Version: 1.16.2

On Wed, 2011-12-14 at 16:07:30 +0100, Martin Pitt wrote:
> Package: dpkg
> Version: 1.16.1.2
> 
> Note that this is not actually in Debian yet, it's for
> git://git.debian.org/users/hertzog/dpkg.git pu/multiarch/full.
> But I'm filing it here because
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632555#20 referred to
> it and to have an early warning before that dpkg branch lands in
> Debian. If you consider that inappropriate, then please just close the
> bug and sorry for the unnecessary noise then.
> 
> If you install the i386 and amd64 variant of a Multi-Arch: same
> package which just has identical files on both architectures, dpkg
> considers one architecture as completely replacing the other, marking
> the package as uninstalled:
> 
> $ LANG= sudo apt-get install --reinstall libpthread-stubs0{,:i386} libpthread-stubs0-dev
> [...]
> Preparing to replace libpthread-stubs0 0.3-2.1ubuntu1 (using .../libpthread-stubs0_0.3-2.1ubuntu1_amd64.deb) ...
> Unpacking replacement libpthread-stubs0 ...
> (Noting disappearance of libpthread-stubs0:i386, which has been completely replaced.)
> Selecting previously unselected package libpthread-stubs0:i386.
> Unpacking libpthread-stubs0:i386 (from .../libpthread-stubs0_0.3-2.1ubuntu1_i386.deb) ...
> Preparing to replace libpthread-stubs0-dev 0.3-2.1ubuntu1 (using .../libpthread-stubs0-dev_0.3-2.1ubuntu1_amd64.deb) ...
> Unpacking replacement libpthread-stubs0-dev ...
> dpkg: dependency problems prevent configuration of libpthread-stubs0-dev:
>  libpthread-stubs0-dev depends on libpthread-stubs0 (= 0.3-2.1ubuntu1); however:
>   Package libpthread-stubs0 is not configured yet.
> dpkg: error processing libpthread-stubs0-dev (--configure):
>  dependency problems - leaving unconfigured
> No apport report written because the error message indicates its a followup error from a previous failure.
>                           Errors were encountered while processing:
>  libpthread-stubs0-dev
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> Note that I sometimes have to run the command twice for it to appear.
> 
> The multi-arch patch was applied in Debian's libpthread-stubs in
> 0.3-3, so that reproducer should work in sid just as well.
> 
> This happens for packages which are metapackages for others (like
> libtag1c2a), or just empty on most architectures (like
> libpthread-stubs0), so they can't be M-A: foreign as they have M-A:
> same dependencies.
> 
> I think the "completely disappeared" logic should not apply in this
> case.

This does not affect 1.16.2, closing.

thanks,
guillem




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 22 Apr 2012 07:45:30 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 04:35:01 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.