8.04->9.04 cups-pdf prevents upgrade (pre-depends error) for some users

Bug #356781 reported by Dave Dombrosky
44
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt
Jaunty
Won't Fix
Medium
Unassigned
Karmic
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-manager

Using Kubuntu 8.04, trying to upgrade to 9.04 using the steps outlined here: https://help.ubuntu.com/community/JauntyUpgrades/Kubuntu/8.04

I am running "bash kubuntu-8.04-to-9.04-beta-upgrade", and the update-manager just dies while it is running. It always dies as soon as it hits the "Installing the upgrades" step. In the console, I see the following come up as soon as it reaches this step:

-----BEGIN CONSOLE-----
 * Starting automatic crash report generation: apport

[ OK ]

update-manager: Fatal IO error: client killed

exitMainLoop
-----END CONSOLE-----

Rebooting doesn't help. The error is reproducible and always comes up at the exact same time during the update process. It looks like the process is using update-manager version 0.111.1. I never get notified of a crash by apport, even though it looks like it is started.

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

Thanks for your bugreport.

Instead of dying it should show a error message dialog. Something like:
"Could not install the upgrades"
a error description and then
"Restoring original system state"

Do you see this dialog?

Revision history for this message
Dave Dombrosky (dombrd) wrote :

No, I do not get the dialog you describe.

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

@Dave: thanks, if your system is still 8.10 please keep it this way so that I can try to add a fix so that it at least recovers cleanly from the situation and we can test it on your system.

Revision history for this message
Dave Dombrosky (dombrd) wrote :

Actually my system is 8.04, which I already specified above.

I will definitely wait for a fix so that we can solve this problem. I'm in no rush to upgrade.

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

This bug was fixed in the package update-manager - 1:0.111.4

---------------
update-manager (1:0.111.4) jaunty; urgency=low

  * DistUpgrade/DistUpgradeViewKDE.py:
    - make the pyqt4 logger less verbose
  * DistUpgrade/DistUpgradeController.py:
    - deal with pre-configure errors more cleanly (LP: #356781)
  * DistUpgrade/DistUpgradeMain.py:
    - fix error when the backup log dir already exists
  * DistUpgrade/DistUpgrade.cfg:
    - stop enabling apport
  * DistUpgrade/DevelReleaseAnnouncement:
    - update text for the release candidate
  * po/*.po:
    - translation updates from rosetta

 -- Michael Vogt <email address hidden> Wed, 08 Apr 2009 11:09:25 +0200

Changed in update-manager (Ubuntu):
status: New → Fix Released
Revision history for this message
Dave Dombrosky (dombrd) wrote :

I just tried this again with update-manager 0.111.4. It still does not work. I'm guessing it might be because the apport fix was not applied to DistUpgrade.cfg.hardy.

Changed in update-manager (Ubuntu):
status: Fix Released → New
Revision history for this message
Dave Dombrosky (dombrd) wrote :

Nevermind about apport. I was guessing the apport fix was why this bug got closed, but I just noticed that the changelog references this bug for "deal with pre-configure errors more cleanly". After realizing this, I looked at my dist-upgrade logs and they appear to be different from what I uploaded before.

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

@Dave: if the system is still in this state that it can not upgrade, could you please run:
$ dpkg --get-selections > /tmp/pkgs.txt
and attach the file /tmp/pkgs.txt ? I will try to reproduce (and fix) the problem then.

Thanks,
 Michael

Revision history for this message
Dave Dombrosky (dombrd) wrote :

Added requested attachment.

Revision history for this message
Dave Dombrosky (dombrd) wrote :

Got this error in the terminal window a couple times when running the upgrade one time recently, but it doesn't happen every time:

python: ../../src/xcb_io.c:182: process_responses: Assertion `((int) (((dpy->last_request_read)) - ((dpy->request))) <= 0)' failed.

I'm attaching the term.log from this run because it looks different.

Revision history for this message
Dave Dombrosky (dombrd) wrote :

I attached the wrong term.log on my last commit. I got confused by the archiving of the dist-upgrade log files and so that file was from an execution that had a different error that I can't reproduce.

However, I was able to get the python error again, and it looks like main.log might have some helpful information on the last line of the file. Hopefully it will help.

Revision history for this message
Dave Dombrosky (dombrd) wrote :

Is there anything else I can do to help with this? I am itching to upgrade to jaunty, but I know that if I do so then I will no longer be able to help solve this bug.

I think I can upgrade by removing cups-pdf, which seems to be the cause of the upgrade failing. I got that workaround from https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/262676. However, that would not help with telling us why the update-manager dies without being able to complete the "restoring state" phase.

So, if you (Ubuntu devs) think it's important, then I'll refrain from trying to get the upgrade to work.

Revision history for this message
Dave Dombrosky (dombrd) wrote :

I have successfully transitioned to jaunty by removing the cups-pdf package before doing the version upgrade. Sorry I couldn't wait, but there didn't seem to be much interest in this issue.

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

@Dave: sorry for the slow feedback. The issue is still not solved, but I think we have all the information we need now. The problem is fortunately not very commom, I'm still trying to reproduce it.

summary: - update-manager: Fatal IO error: client killed
+ 8.04->9.04 cups-pdf prevents upgrade (pre-depends error) for some users
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Michael Vogt (mvo)
Changed in update-manager (Ubuntu Karmic):
assignee: nobody → Michael Vogt (mvo)
status: Confirmed → Fix Released
Changed in update-manager (Ubuntu Jaunty):
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Medium
milestone: none → jaunty-updates
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

Here is the fix I put into karmic so that hardy->karmic upgrades work:

diff -u cups-pdf-2.5.0/debian/changelog cups-pdf-2.5.0/debian/changelog
--- cups-pdf-2.5.0/debian/changelog
+++ cups-pdf-2.5.0/debian/changelog
@@ -1,3 +1,12 @@
+cups-pdf (2.5.0-8ubuntu1) karmic; urgency=low
+
+ * debian/control:
+ - help apt pre-depends resolver by adding a explicit
+ pre-dependency on libcups2 (that is part of the cups
+ dependencies) LP: #356781
+
+ -- Michael Vogt <email address hidden> Wed, 21 Oct 2009 13:59:55 +0200
+
 cups-pdf (2.5.0-8) unstable; urgency=low

   * Bumped Standards-Version to 3.8.3 (no change required).
diff -u cups-pdf-2.5.0/debian/control cups-pdf-2.5.0/debian/control
--- cups-pdf-2.5.0/debian/control
+++ cups-pdf-2.5.0/debian/control
@@ -2,14 +2,15 @@
 Source: cups-pdf
 Section: graphics
 Priority: optional
-Maintainer: Debian CUPS Maintainers <email address hidden>
+Maintainer: Ubuntu Developers <email address hidden>
+XSBC-Original-Maintainer: Debian CUPS Maintainers <email address hidden>
 Uploaders: Martin-Éric Racine <email address hidden>
 Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5)
 Standards-Version: 3.8.3

 Package: cups-pdf
 Architecture: any
-Pre-Depends: cups (>= 1.1.15), cups-client, libpaper-utils
+Pre-Depends: libcups2 (>= 1.1.15), cups (>= 1.1.15), cups-client, libpaper-utils
 Depends: ghostscript, ${shlibs:Depends}, ${misc:Depends}
 Suggests: system-config-printer-gnome | system-config-printer-kde | system-config-printer
 Enhances: cups

Revision history for this message
Steve Langasek (vorlon) wrote :

I've rejected the cups-pdf upload. The right fix is for cups-pdf to not have *any* Pre-Depends, *at all*. The justification given in the cups-pdf changelog for adding them is bogus:

cups-pdf (2.5.0-3) unstable; urgency=low

  * The "inching towards automated queue addition/removal" release:
    + Moved cups/cups-client/libpaper-utils to Pre-Depends since we need
      those to be preconfigured for CUPS-PDF maintainer scripts to work.
    + Added a prerm maintainer script.

 -- Martin-<C3><89>ric Racine <email address hidden> Thu, 04 Jun 2009 09:06:05 +0300

cups-pdf has no preinst script, so this is wrong and should be fixed instead.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Steve, it could be a good idea for you to read the changelog more attentively:

cups-pdf (1.6.3-3) unstable; urgency=medium

  * Moved cupsys to Pre-Depends, to ensure that group lpadmin is created
    before the installation of cups-pdf (Closes: #286024).

...and no, the explanation is NOT bogus. Those dependencies DO need to be configured, *before* CUPS-PDF configuration can proceed.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 356781] Re: 8.04->9.04 cups-pdf prevents upgrade (pre-depends error) for some users

Martin-Éric Racine [2009-10-21 19:38 -0000]:
> ...and no, the explanation is NOT bogus. Those dependencies DO need to
> be configured, *before* CUPS-PDF configuration can proceed.

Depends: ensures that any dependencies are configured before your
postinst runs. Pre-Depends: does the same for preinst, but since
cups-pdf doesn't have a preinst, it isn't necessary.

http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Martin, thank you for the explanation. I'm wondering how does it explain Debian bug #286024 findings?

Revision history for this message
to be removed (liw) wrote :

Martin-Éric, the Debian bug you refer to has this:

Unpacking cups-pdf (from .../cups-pdf_1.6.3-2_i386.deb) ...
chown: `root:lpadmin': invalid group
dpkg: error processing
/var/cache/apt/archives/cups-pdf_1.6.3-2_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1

Back then, cups-pdf clearly had a preinst script. Back then it is possible that a Pre-Depends was the right solution (though I doubt it, since Pre-Depends is so rarely the right solution). Today, there is no preinst script, so Pre-Depends is not necessary at all.

From the Debian bug, I guess (not being interested in digging up the five year old package) that the preinst script did a "chgrp lpadmin" without ensuring that the group exists. Pre-Depending on cupsys fixed this, since cupsys's maintainer scripts created the group.

Today, cups-pdf does that chown. The package already depends on cups-client, which creates the group. Since postinst will only be run after dependencies have been configured, the cups-pdf postinst can rely on the lpadmin group existing.

I hope this clarifies the situation.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Jaunty reached end-of-life on 23 October 2010, so this bug will not be fixed in that version of Ubuntu. It has been fixed in newer versions.

Changed in update-manager (Ubuntu Jaunty):
assignee: Michael Vogt (mvo) → nobody
status: In Progress → Won't Fix
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.