Update to gutsy failed

Bug #146943 reported by fx5
48
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Gutsy by FlagMan

Bug Description

Binary package hint: update-manager

I tried to update to gutsy yesterday, but it failed.

First error is:
(Translated from german to sort of english)

Preparing to replace python-apt 0.6.20ubuntu16 (durch .../python-apt_0.7.3.1ubuntu1_i386.deb) ...
dpkg-query: Error while parsing, in file »/var/lib/dpkg/updates/0031« near line 2 package »libc6«:
 »triggers-pendi« is not allowed for third (status-)wort in field »status«
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1394, in <module>
    main()
  File "/usr/bin/pycentral", line 1388, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 955, in run
    pkg.read_version_info()
  File "/usr/bin/pycentral", line 542, in read_version_info
    raise PyCentralError, "package has no field Python-Version"
__main__.PyCentralError: package has no field Python-Version
dpkg: warning - old pre-removal-skript ended with error status 1
dpkg - trying new script instead ...
 2 Pakage »libc6«:
dpkg: Error while working on /var/cache/apt/archives/python-apt_0.7.3.1ubuntu1_i386.deb (--unpack):
 Subprocess of pre-removal-Script gave error code 1
  File "/usr/bin/pycentral", line 879, in run
dpkg: Error while cleaning up:
 Subprocess post-installation script gave error code 1

Original german error:

Vorbereiten zum Ersetzen von python-apt 0.6.20ubuntu16 (durch .../python-apt_0.7.3.1ubuntu1_i386.deb) ...
dpkg-query: Fehler beim Parsen, in Datei »/var/lib/dpkg/updates/0031« nahe Zeile 2 Paket »libc6«:
 »triggers-pendi« ist nicht erlaubt für drittes (Status-)Wort im Feld »status«
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1394, in <module>
    main()
  File "/usr/bin/pycentral", line 1388, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 955, in run
    pkg.read_version_info()
  File "/usr/bin/pycentral", line 542, in read_version_info
    raise PyCentralError, "package has no field Python-Version"
__main__.PyCentralError: package has no field Python-Version
dpkg: Warnung - altes pre-removal-Skript wurde mit Fehler-Status 1 beendet
dpkg - probiere stattdessen Skript aus dem neuen Paket ...
 2 Paket »libc6«:
dpkg: Fehler beim Bearbeiten von /var/cache/apt/archives/python-apt_0.7.3.1ubuntu1_i386.deb (--unpack):
 Unterprozess neues pre-removal-Skript gab den Fehlerwert 1 zurück
  File "/usr/bin/pycentral", line 879, in run
dpkg: Fehler beim Aufräumen:
 Unterprozess post-installation script gab den Fehlerwert 1 zurück
Vorbereiten zum Ersetzen von libglade2-0 1:2.6.0-3 (durch .../libglade2-0_1%3a2.6.2-1_i386.deb) ...
u1_i386.deb (--unpack):
Entpacke Ersatz für libglade2-0 ...
------------

After this, installation of launchpad-integration failed (pre-removal-script error code 1) fails and this causes many other packages to have broken dependencies.

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

Thanks for your bugreport. Please attach the files in /var/log/dist-upgrade/* to this report. Thanks, Michael

Changed in update-manager:
status: New → Incomplete
Revision history for this message
Michael Vogt (mvo) wrote :

Can you also please attach "/var/lib/dpkg/updates/0031" and "/var/lib/dpkg/status" ?

Revision history for this message
fx5 (packaging) wrote : /var/log/dist-upgrade/main.log
Revision history for this message
fx5 (packaging) wrote : /var/log/dist-upgrade/apt.log
Revision history for this message
fx5 (packaging) wrote : /var/log/dist-upgrade/term.log
Revision history for this message
fx5 (packaging) wrote : Can not add the other files

Can not add "/var/lib/dpkg/updates/0031" because it's gone.

I repaired my installation with

# dpkg -i launchpad-integration*.deb

and

# apt-get dist-upgrade

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Bug 146956 has some extra logs, unfortunately I neither catched the /var/lb/dpkg/updates/... file. I fixed the installation with manually sudo dpkg -i:ing the python-apt package in /var/cache/apt/archives/ and then sudo dpkg --configure -a.

Revision history for this message
Mathias Gug (mathiaz) wrote :

I've seen the same error during an upgrade to gusty, with python-apt_0.7.3.1ubuntu2.

I've fixed it with apt-get install python-apt after I rebooted, which caused all the unconfigured packages to be configured.

I've attached /var/lib/dpkg/status

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

This was probably related, too, pseudo-translated to English:

Reading changelogs... Done
apt-listchanges: Sending: root: apt-listchanges: news from timo-laptop
sh: /usr/sbin/sendmail: not found
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 219, in <module>
    main()
  File "/usr/bin/apt-listchanges", line 203, in main
    apt_listchanges.mail_changes(config.email_address, news, subject)
  File "/usr/share/apt-listchanges/apt_listchanges.py", line 104, in mail_change
s
    fh.write(message.as_string())
IOError: [Errno 32] Broken pipe

Revision history for this message
FlagMan (flagman) wrote :

@ Timo:
Why do you think this is related?

FWIW:
I can confirm this bug, too.
Encountered it yesterday while doing an upgrade from 7.04 to gutsy-rc.

I get the exact same error as the original poster, beginning with:

dpkg-query: Fehler beim Parsen, in Datei »/var/lib/dpkg/updates/0013« nahe Zeile 2 Paket »libc6«:
 »triggers-pendi« ist nicht erlaubt für drittes (Status-)Wort im Feld »status«

and unfortunately, by now /var/lib/dpkg/updates is empty, too.

There were a lot of packages that didn't resolve afterwards, so I consider this bug somewhat
critical to upgrading.
Anyway, I will try the suggestions above.

Revision history for this message
FlagMan (flagman) wrote :

Oh well,
a simple:

sudo apt-get install python-apt

did fix it without a reboot. All the previously held back packages installed
automatically. Not so critical then.
Irritating, rather...

Revision history for this message
fx5 (packaging) wrote : Maybe a localisation problem?

Maybe a localisation problem?

You are all using german language?

Revision history for this message
fx5 (packaging) wrote : Old dpkg does not know about triggers?

I had a look into my logfile again and noticed, that this happens before dpkg is updated!

dpkg-query is failing because it does not know about triggers. This causes python-central to be unable to parse the package-status.

Update dpkg before using triggers!

Changed in update-manager:
status: Incomplete → Confirmed
Revision history for this message
karamurat (karamurat-com) wrote : Re: [Bug 146943] Maybe a localisation problem?

no i use French language ...

2007/10/14, fx5 <email address hidden>:
>
> Maybe a localisation problem?
>
> You are all using german language?
>
> --
> Update to gutsy failed
> https://bugs.launchpad.net/bugs/146943
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
FlagMan (flagman) wrote :

@fx5:
triggers may well be the reason, they have just recently been added:
http://lists.debian.org/debian-dpkg/2007/08/msg00009.html

What makes me a bit suspicious is that we all seem to have a
truncated third status word in /var/lib/dpkg/updates/00?? , namely:
"triggers-pendi" instead of "triggers-pending"
(look at the various term.log files)

Anyway, I added two other duplicates.

Revision history for this message
fx5 (packaging) wrote :

python-apt is packaged with python-central.
python-central use dpkg-query to read the package-fields (like Python-Version).
dpkg-query seems to fail, because it is the old (feisty-) version that does know about triggers.
There is a trigger-status for libc6.

But I don't understand, how this trigger-status is done when dpkg is not updated yet.
I tried to find out, but I don't know how this works.

Revision history for this message
fx5 (packaging) wrote :

@FlagMan
>> "triggers-pendi" instead of "triggers-pending"

When returning an error, dpkg calculates the length of the error-message by the length of the last word it was looking for. This word is "removal-failed", 14 chars.

(Found in fields.c, line 58)

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

FlagMan: No, sorry, I misread the logs, my latest addendum did not have anything to do with this bug.

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

This is fixed with the upload of the latest python-apt (from today). It will ensure that a version of dpkg is available that understands about triggers.

Thanks and sorry for the trouble,
 MIchael

Changed in update-manager:
status: Confirmed → Fix Released
Revision history for this message
Deepak Sarda (antrix) wrote :

I think I've been affected by this problem too. Now I'm half through upgrading Kubuntu to Gutsy and am stuck because none of the dpkg stuff works. Based on suggestions above, I tried 'apt-get install python-apt' but it said 'E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.'

So I ran 'dpkg --configure -a' but I get this error:

dpkg: parse error, in file `/var/lib/dpkg/updates/0003' near line 2 package `libc6':
 `triggers-pendi' is not allowed for third (status) word in `status' field

I understand from the above comments that a new python-apt makes dpkg understand the triggers field. But how do I install this new python-apt since installing anything needs me to run 'dpkg --configure'. Seems to me that I'm stuck in a chicken-and-egg situation :(

I tried restarting the update but it couldn't get a lock on the package db. Is it okay to delete the stuff in /var/lib/dpkg/updates/* and resume the upgrade?
Any suggestions appreciated.

Revision history for this message
fx5 (packaging) wrote :

1. When did you start update?
The bug should be fixed.
Please post your /etc/apt/sources.list
Maybe you use a mirror that is not updated yet.
What does "apt-cache policy python-apt" say?

2. Try this:
> cd /var/cache/apt/archives/
> sudo dpkg -i python-central_0.5.15ubuntu2_all.deb
> sudo dpkg -i python-apt_0.7.3.1ubuntu4_*.deb # Or the version number you have
> sudo dpkg -i dpkg_1.14.5ubuntu16_*.deb
> sudo dpkg --configure -a
> sudo apt-get dist-upgrade

Revision history for this message
Deepak Sarda (antrix) wrote :

These are the uncommented lines in my sources.list
------------------------------------
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy main restricted multiverse universe
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted multiverse universe
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-security main restricted multiverse universe
deb http://tw.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted multiverse universe
deb http://archive.canonical.com/ubuntu gutsy partner
deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed restricted main multiverse universe
-------------------------------------
I started the upgrade on 16th at around 9pm singapore time (1pm GMT). As you say, perhaps the taiwan mirror wasn't yet in sync. But then again, the versions of the deb files in the apt cache match those you gave in your steps above.

I can't carry out the steps you suggested since running 'dpkg -i' on any package gives me this error:
----------------------
 dpkg: parse error, in file `/var/lib/dpkg/updates/0003' near line 2 package `libc6':
 `triggers-pendi' is not allowed for third (status) word in `status' field
----------------------

Do you think there's some way I can force a package install without worrying about the pending libc6 package? Or roll-back that libc6 upgrade? Or even manually extract the relevant bits from python-central*.deb, python-apt*deb & dpkg*deb and overwrite the filesystem with contents from those packages?

Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :

I can still confirm this issue on an upgrade (7.04 to gutsy-rc) started 16-Oct afternoon US Pacific time. I hit the original python-apt issue, but the install continued behind the error window. When it finally aborted, it ran 'dpkg --configure -a' which eventually failed and can no longer be started because of the following error:

dpkg: parse error, in file `/var/lib/dpkg/status' near line 33397 package `libc6':
 `triggers-pendi' is not allowed for third (status) word in `status' field

Will attach what files I can still find.

Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :
Revision history for this message
fx5 (packaging) wrote :

Hi Chris,
thanks for your bug-report, but i think, it is not the same bug.

The update of dpkg failed. I don't know the reason (IOError? maybe a harddisk problem?)
-----
Preparing to replace dpkg 1.13.24ubuntu6 (using .../dpkg_1.14.5ubuntu16_i386.deb) ...
Unpacking replacement dpkg ...
i386.deb) ...
dpkg-deb (subprocess): error in buffer_read(stream): failed to write to pipe in copy: Input/output error
dpkg-deb: subprocess paste returned error exit status 2
dpkg: error processing /var/cache/apt/archives/dpkg_1.14.5ubuntu16_i386.deb (--unpack):
 short read in buffer_copy (backend dpkg-deb during `./usr/share/locale/sk/LC_MESSAGES/dpkg.mo')
Errors were encountered while processing:
 /var/cache/apt/archives/dpkg_1.14.5ubuntu16_i386.deb
----

Now you still have the old dpkg which has no clue how to handle triggers. First thing you have to do is to update your dpkg-package.
This will fail because of the trigger in `/var/lib/dpkg/updates/0006'.
To get it working again, you can try to remove the line
> Triggers-Pending: ldconfig
and replace the line
> Status: install ok triggers-pending
by
> Status: install ok installed

now you can run
> dpkg -i /var/cache/apt/archives/dpkg_1.14.5ubuntu16_i386.deb
> apt-get --reinstall install libc6
> dpkg --configure -a
> apt-get dist-upgrade

Revision history for this message
Chris Nelson (christopher-s-nelson) wrote :

Thanks fx5. After a bit more looking, I had come to the same conclusion and tried the dpkg install again (after editing /var/lib/dpkg/status), and the error repeated. It turned out to be a bad copy of dpkg_1.14.5ubuntu16_i386.deb in /var/cache/apt/archives. I downloaded a new copy and installed it, changed back /var/lib/dpkg/status, and things are moving along better now.

I guess I had jumped to my conclusion too quickly after seeing the similarities to the earlier posts.

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.