debsums "invalid package name"

Bug #809924 reported by Chad Miller
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
debsums (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

debsums 2.0.48+nmu3ubuntu2

Starting with Oneiric, updates get debsums complaints.

cryptsetup: WARNING: failed to detect canonical device of /dev/sda5
debsums: invalid package name 'binutils'
debsums: invalid package name 'binutils-static'
debsums: invalid package name 'bogofilter'
debsums: invalid package name 'dhcp3-client'
debsums: invalid package name 'dhcp3-common'
debsums: invalid package name 'g++'
debsums: invalid package name 'git-core'
debsums: invalid package name 'gnuplot'
debsums: invalid package name 'google-chrome-stable'
debsums: invalid package name 'libaudio-dev'
debsums: invalid package name 'libaudio2'
debsums: invalid package name 'libreadline-dev'
debsums: invalid package name 'netbase'
debsums: invalid package name 'python-all'
debsums: invalid package name 'python-all-dev'
debsums: invalid package name 'python-dbg'
debsums: invalid package name 'python-dev'
debsums: invalid package name 'python-examples'
debsums: invalid package name 'xbase-clients'
debsums: invalid package name 'xloadimage'
debsums: invalid package name 'xserver-xorg-input-all'
debsums: invalid package name 'xserver-xorg-video-all'
debsums: invalid package name 'xutils'
E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi'
E: Sub-process returned an error code

$ ls -l /var/cache/apt/archives/{binutils,binutils-static,bogofilter,dhcp3-client,dhcp3-common,g++}_*
-rw-r--r-- 1 root root 2.3M 2011-07-07 03:04 /var/cache/apt/archives/binutils_2.21.52.20110707-1ubuntu1_i386.deb
-rw-r--r-- 1 root root 730K 2011-07-07 03:04 /var/cache/apt/archives/binutils-static_2.21.52.20110707-1ubuntu1_i386.deb
-rw-r--r-- 1 root root 1004 2011-05-10 09:04 /var/cache/apt/archives/bogofilter_1.2.2-3ubuntu1_i386.deb
-rw-r--r-- 1 root root 5.5K 2011-06-20 11:04 /var/cache/apt/archives/dhcp3-client_4.1.1-P1-17ubuntu3_all.deb
-rw-r--r-- 1 root root 1.8K 2011-06-20 11:04 /var/cache/apt/archives/dhcp3-common_4.1.1-P1-17ubuntu3_all.deb
-rw-r--r-- 1 root root 1.5K 2011-04-28 10:14 /var/cache/apt/archives/g++_4%3a4.6.0-3ubuntu1_i386.deb

Revision history for this message
Steve Beattie (sbeattie) wrote :

Reproduced, it causes the upgrade to oneiric to fail.

Changed in debsums (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

You can work around this with 'sudo dpkg --purge debsums' then continue with the upgrade.

Revision history for this message
doctordruidphd (doctordruidphd) wrote :

Same problem here. This is a 64-bit system that has been dist-upgraded from natty.

Tried removing, purging, and reinstalling debsums - didn't help.
Tried sudo debsums_init - didn't help.

Another workaround:

sudo mv /usr/bin/debsums /usr/bin/debsumsNOT

This will allow the upgrades to go through, without removing the package.

Revision history for this message
Oier Mees (oier) wrote :

After upgrading to Oneiric with errors(see bug #828759) I have an almost unusable system because apt exits with error every operation.
Whenever I try to install or reinstall packages I get debsums errors and can't perform the operation. Moreover, since trying to install updates for banshee and firefox(update exited with the error of the bug description), they don't work anymore (they worked in Oneiric before trying to update them) because they freeze on startup and eat %100 CPU!!! (See #830012 for banshee)

Revision history for this message
Matthias Gehre (m-gehre) wrote :

Try
sudo rm /etc/apt/apt.conf.d/90debsums
which removes the post-install hook

Revision history for this message
Peter Júnoš (petoju) wrote :

Temporary workaround without hook removal is
sudo apt-get clean
But it works only till that packages will be downloaded.

Revision history for this message
Ryan Niebur (ryan52) wrote :

The easiest way to disable the hook is built in to the package. If you run "sudo dpkg-reconfigure debsums" it will ask you "Should debsums files be generated automatically by apt-get?", and you can change the setting to "No". This should fix your system.

Anyways, I looked into solving the actual problem too. Yesterday I uploaded a new debsums to Debian with proper multiarch support (thanks to a patch by Anders Kaseorg).

I tested it on an amd64 system with i386 multiarch libraries installed. With the new Debian version of debsums, running "debsums libc6" correctly lists "x86_64-linux-gnu" files, and running "debsums libc6:i386" correctly lists "i386-linux-gnu" files.

So then on this system I installed the Ubuntu debsums .deb which is supposed to have multiarch support. When running "debsums libc6", it lists the "i386-linux-gnu" files (from libc6:i386, which is wrong), and when running "debsums libc6:i386" it dies of this error: debsums: invalid package name 'libc6:i386'.

While this isn't the exact same problem as the bug reporters had, clearly there is something wrong with the multiarch logic in this version of debsums. I haven't actually tested the new Debian debsums on Ubuntu, but I suspect this would solve it.

Revision history for this message
Ryan Niebur (ryan52) wrote :
Download full text (3.6 KiB)

Reproduced the problem in an oneiric chroot. And confirmed that the new Debian version fixes it.

It only occurs when there are .deb files in /var/cache/apt/archives for packages which don't include md5sums files (my example is binutils).

(oneiric-i386)root@buildd:~# ls -l /var/lib/dpkg/info/binutils.md5sums
ls: cannot access /var/lib/dpkg/info/binutils.md5sums: No such file or directory
(oneiric-i386)root@buildd:~# cd /var/cache/apt/archives/
(oneiric-i386)root@buildd:/var/cache/apt/archives# dget binutils
dget: retrieving http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.21.53.20110810-0ubuntu1_i386.deb
--2011-09-05 17:37:16-- http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.21.53.20110810-0ubuntu1_i386.deb
Resolving archive.ubuntu.com... 91.189.88.40, 91.189.88.45, 91.189.88.46, ...
Connecting to archive.ubuntu.com|91.189.88.40|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2380292 (2.3M) [application/x-debian-package]
Saving to: `binutils_2.21.53.20110810-0ubuntu1_i386.deb'

100%[============================================================================================================================================================>] 2,380,292 429K/s in 7.4s

2011-09-05 17:37:24 (315 KB/s) - `binutils_2.21.53.20110810-0ubuntu1_i386.deb' saved [2380292/2380292]

(oneiric-i386)root@buildd:/var/cache/apt/archives# cd
(oneiric-i386)root@buildd:~# apt-get install -y --force-yes --reinstall debsums=2.0.48+nmu3ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfile-fnmatch-perl
Use 'apt-get autoremove' to remove them.
The following packages will be DOWNGRADED:
  debsums
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/54.2 kB of archives.
After this operation, 4096 B disk space will be freed.
Preconfiguring packages ...
dpkg: warning: downgrading debsums from 2.0.49 to 2.0.48+nmu3ubuntu2.
(Reading database ... 14706 files and directories currently installed.)
Preparing to replace debsums 2.0.49 (using .../debsums_2.0.48+nmu3ubuntu2_all.deb) ...
Unpacking replacement debsums ...
Setting up debsums (2.0.48+nmu3ubuntu2) ...
debsums: invalid package name 'binutils'
E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi'
E: Sub-process returned an error code
(oneiric-i386)root@buildd:~# debsums -s; echo $?
debsums: no md5sums for binutils
debsums: can't open /var/lib/dpkg/info/binutils.md5sums (No such file or directory)
2
(oneiric-i386)root@buildd:~# /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; echo $?
debsums: invalid package name 'binutils'
1
(oneiric-i386)root@buildd:~# dpkg -i /home/ryan52/debian/result/debsums_2.0.49_all.deb
(Reading database ... 14706 files and directories currently installed.)
Preparing to replace debsums 2.0.48+nmu3ubuntu2 (using .../result/debsums_2.0.49_all.deb) ...
Unpacking replacement debsums ...
Setting up debsums (2.0.49) ...
(oneiric-i386)root@buildd:~# debsum...

Read more...

Chad Miller (cmiller)
Changed in debsums (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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