apt fails to install libglapi-mesa-lts-quantal correctly on switching x stacks

Bug #1062503 reported by Maarten Lankhorst
94
This bug affects 67 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

I'm trying to get renaming x stacks between normal xorg and xorg from quantal working, and for that the I've renamed all the xorg packages with a conflicts/provides/replaces on the unrenamed packages.

This works reasonably well but now switching between them fails if I have wine installed from ppa:~ubuntu-wine/ppa and ia32-libs installed.

I'm switching by installing ppa:ubuntu-x-swat/q-lts-backport , having xorg-server updated and libgl1-mesa-{glx,dri}{,:i386} installed and then installing with apt-get install xorg-server-lts-quantal libgl1-mesa-{glx,dri}-lts-quantal{,:i386} for conflict resolution.

However, halfway through it installs libglapi-mesa-lts-quantal:i386 after removing libglapi-mesa for both archs, then proceeds to install libgl1-mesa-glx-lts-quantal for both archs, but because libglapi-mesa-lts-quantal:amd64 is not installed dpkg fails and you're stuck with a broken installation.

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :
Changed in apt (Ubuntu):
milestone: none → ubuntu-12.04.2
Revision history for this message
Michael Vogt (mvo) wrote :

The output of:
$ sudo apt-get -o Debug::pkgOrderList=1 -o Debug::pkgPackageManager=1 -o Debug::pkgDPkgPM=1 install pkgname(s)

would be interessting.

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :
Changed in apt (Ubuntu):
importance: Undecided → Medium
Changed in apt (Ubuntu):
importance: Medium → High
Revision history for this message
Michael Vogt (mvo) wrote :

<mvo> mlankhorst: just to confirm , that quantal version of apt-get had the same error #1062503 ?
<mlankhorst> yeah

Revision history for this message
Michael Vogt (mvo) wrote :

The log shows:
...
/usr/bin/dpkg --status-fd 128 --unpack --auto-deconfigure /var/cache/apt/archives/libglapi-mesa-lts-quantal_9.0~git20121004.b2048c5e-0ubuntu1~precise1~ppa6_i386.deb
...
/usr/bin/dpkg --status-fd 134 --configure libglapi-mesa-lts-quantal:i386 libglapi-mesa-lts-quantal:amd64 libgl1-mesa-glx-lts-quantal:i386 libgl1-mesa-glx-lts-quantal:amd64
...

Which is obviously wrong, its unpacking the i386 version of libglapi-mesa-lts-quantal but then later its tries to configure that (fine) but also the amd64 version of it which is not yet unpacked!

Revision history for this message
Michael Vogt (mvo) wrote :

To reproduce:
(open e.g. pbuilder chroot)
# apt-get install vim-tiny python-software-properties
# add-apt-repository ppa:ubuntu-x-swat/q-lts-backport
# apt-get install wine1.4
# apt-get install ia32-libs
# apt-get install xserver-xorg libgl1-mesa-{glx,dri}{,:i386}
and now
# apt-get install xserver-xorg-lts-quantal libgl1-mesa-{glx,dri}-lts-quantal{,:i386} -o Debug::pkgDPkgPM=1 -y
shows the error. or:
# apt-get install xserver-xorg-lts-quantal libgl1-mesa-{glx,dri}-lts-quantal{,:i386} -o Debug::pkgDPkgPM=1 -y 2>&1 | grep libglapi-mesa
...
/usr/bin/dpkg --status-fd 19 --unpack --auto-deconfigure /var/cache/apt/archives/libglapi-mesa-lts-quantal_9.0-0ubuntu1~precise1~ppa6.3_i386.deb
/usr/bin/dpkg --status-fd 25 --configure libglapi-mesa-lts-quantal:i386 libglapi-mesa-lts-quantal:amd64 libgl1-mesa-glx-lts-quantal:i386 libgl1-mesa-glx-lts-quantal:amd64

Revision history for this message
Michael Vogt (mvo) wrote :

Unpack in /tmp and run:
$ apt-get install -y -o Debug::pkgDPkgPM=1 -o dir::state::status=/tmp/precise/var/lib/dpkg/status -o Dir=/tmp/precise xserver-xorg-lts-quantal libgl1-mesa-{glx,dri}-lts-quantal{,:i386} -o debug::nolocking=true 2>&1 | grep libglapi-mesa
...
/usr/bin/dpkg --status-fd 16 --unpack --auto-deconfigure /tmp/precise/var/cache/apt/archives/libglapi-mesa-lts-quantal_9.0-0ubuntu1~precise1~ppa6.3_i386.deb
/usr/bin/dpkg --status-fd 22 --configure libglapi-mesa-lts-quantal:i386 libglapi-mesa-lts-quantal:amd64 libgl1-mesa-glx-lts-quantal:i386 libgl1-mesa-glx-lts-quantal:amd64

(may require 64bit install)

Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
David Kalnischkies (donkult) wrote :

I guess I found the problem. Or in fact two problems, just that the first hides the second and the second isn't an error condition. In short: SmartConfigure for an M-A:same package will do a lock-step configuration for all other ((to be) installed) archs. It just doesn't check if the package it wants to configure was unpacked causing us to configure not unpacked packages here.

The second is in SmartUnPack which does a similar looping over the M-A:same architectures of a package, but this time of course for unpack and that is the second "problem": It will happily unpack packages we have already unpacked and configured as it isn't checking for that case either -- as this can't happen anyway as you can see here. ;)

Your testcases have no problem with that change, but I have to admit that I was unable to create a testcase for this bug so far (mvo's works, it's just to big…). As this bug-ordering-solution has a rather unusual way through dependency-hell it would be quiet good to have one though. :/

(Attached is the same patch as in my lp branch for your cherry-picking convenience -- patch-name-pun intended)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "apt-ubuntu-1062503-it-isnt-smart-to-work-too-much.diff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

Yeah, I can confirm that switching stacks works properly now. :-)

Michael Vogt (mvo)
Changed in apt (Ubuntu):
status: New → In Progress
Changed in apt (Ubuntu Precise):
status: New → In Progress
Changed in apt (Ubuntu Quantal):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.9.7.6ubuntu1

---------------
apt (0.9.7.6ubuntu1) raring; urgency=low

  [ Michael Vogt ]
  * merged from debian-sid

  [ Program translation updates ]
  * Catalan (Jordi Mallach)
  * Drop a confusing non-breaking space. Closes: #691024
  * Thai (Theppitak Karoonboonyanan). Closes: #691613

  [ David Kalnischkies ]
  * apt-pkg/packagemanager.cc:
    - do not do lock-step configuration for a M-A:same package if it isn't
      unpacked yet in SmartConfigure and do not unpack a M-A:same package
      again in SmartUnPack if we have already configured it (LP: #1062503)

  [ Steve Langasek ]
  * debian/apt.conf.autoremove: don't include linux-image*,
    linux-restricted-modules*, and linux-ubuntu-modules* packages in the
    list to never be autoremoved.
  * debian/apt.auto-removal.sh, debian/rules, debian/apt.dirs: install new
    script to /etc/kernel/postinst.d/ which ensures we only automatically
    keep the currently-running kernel, the being-installed kernel, and the
    newest kernel, so we don't fill /boot up with an unlimited number of
    kernels. LP: #923876.

apt (0.9.7.6) unstable; urgency=low

  [ Program translation updates ]
  * Ukrainian (A. Bondarenko)

  [ David Kalnischkies ]
  * apt-pkg/pkgcachegen.cc:
    - ensure that dependencies for packages:none are always generated
    - add 2 missing remap registrations causing a segfault in case
      we use the not remapped iterators after a move of the mmap again
    - write the native architecture as unique string into the cache header
      as it is used for arch:all packages as a map to arch:native.
      Otherwise arch comparisons later will see differences (Closes: #689323)
  * apt-pkg/pkgcache.cc:
    - ignore negative dependencies applying in the same group for M-A:same
      packages on the real package name as self-conflicts (Closes: #688863)
  * cmdline/apt-cache.cc:
    - print versioned dependency relations in (r)depends if the option
      APT::Cache::ShowVersion is true (default: false) as discussed in
      #218995 to help debian-cd fixing #687949. Thanks to Sam Lidder
      for initial patch and Steve McIntyre for nagging and testing!
  * apt-pkg/edsp.cc:
    - include reinstall requests and already installed (= protected) packages
      in the install-request for external resolvers (Closes: #689331)
  * apt-pkg/policy.cc:
    - match pins with(out) an architecture as we do on the commandline
      (partly fixing #687255, b= support has to wait for jessie)
  * apt-pkg/contrib/netrc.cc:
    - remove the 64 char limit for login/password in internal usage
    - remove 256 char line limit by using getline() (POSIX.1-2008)

  [ Colin Watson ]
  * apt-pkg/pkgcachegen.cc:
    - Fix crash if the cache is remapped while writing a Provides version
      (LP: #1066445).
 -- Michael Vogt <email address hidden> Tue, 06 Nov 2012 15:12:36 +0100

Changed in apt (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

I uploaded a version to quantal-proposed now.

Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Maarten, or anyone else affected,

Accepted apt into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apt/0.9.7.5ubuntu5.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Maarten, or anyone else affected,

Accepted apt into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apt/0.8.16~exp12ubuntu10.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

I can confirm that switching stacks works with 0.8.16~exp12ubuntu10.6, thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.9.7.5ubuntu5.1

---------------
apt (0.9.7.5ubuntu5.1) quantal-proposed; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/packagemanager.cc:
    - do not do lock-step configuration for a M-A:same package if it isn't
      unpacked yet in SmartConfigure and do not unpack a M-A:same package
      again in SmartUnPack if we have already configured it (LP: #1062503)

  [ Michael Vogt ]
  * update Vcs to link to the quantal branch
 -- Michael Vogt <email address hidden> Fri, 09 Nov 2012 09:41:23 +0100

Changed in apt (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.8.16~exp12ubuntu10.6

---------------
apt (0.8.16~exp12ubuntu10.6) precise-proposed; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/packagemanager.cc:
    - do not do lock-step configuration for a M-A:same package if it isn't
      unpacked yet in SmartConfigure and do not unpack a M-A:same package
      again in SmartUnPack if we have already configured it (LP: #1062503)

  [ Michael Vogt ]
  * update Vcs to link to the precise branch
 -- Michael Vogt <email address hidden> Fri, 09 Nov 2012 10:06:31 +0100

Changed in apt (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Ryo Onodera (ryoqun) wrote :

Hi, for your information, this was affecting following bugs too:

Bug #1065722
Bug #1025408
Bug #1025405
Bug #1068555
Bug #1069214

I was separately investigating this issue. The following comments are my report of the investigation (including reproduciable steps):

https://bugs.launchpad.net/ubuntu/+source/jbigkit/+bug/1025408/comments/10
https://bugs.launchpad.net/ubuntu/+source/jbigkit/+bug/1025408/comments/11

All of these bugs are due to an upgrade failure with multi-arch packages.

Thanks very much for fixing this bug!

Revision history for this message
Ryo Onodera (ryoqun) wrote :

Oops, I forgot one thing to say.

Could you confirm these bugs are really fixed now and close them?

Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

Ok I marked all the bugs you confirmed fixed as dupes of this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.