[Bug 494350] Re: /var/lib/dpkg/info/sreadahead.postinst called with unknown argument `triggered'
Raphaël Hertzog
hertzog at debian.org
Sat Nov 26 13:44:45 UTC 2011
This has been fixed in dpkg 1.16.1:
* Fix dpkg --remove to really remove the triggers from the various
internal files in /var/lib/dpkg/info/triggers/. Closes: http://bugs.debian.org/525160
** Bug watch added: Debian Bug tracker #525160
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525160
** Changed in: dpkg (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/494350
Title:
/var/lib/dpkg/info/sreadahead.postinst called with unknown argument
`triggered'
Status in “dpkg” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: ureadahead
TRANSCRIPT:
root at goose:~# apt-get -V upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
google-chrome-unstable (4.0.249.22-r33427 => 4.0.249.30-r33928)
grub-common (1.97~beta4-1ubuntu4 => 1.97~beta4-1ubuntu4.1)
ntpdate (4.2.4p6+dfsg-1ubuntu5 => 4.2.4p6+dfsg-1ubuntu5.1)
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
After this operation, 24.6kB of additional disk space will be used.
Do you want to continue [Y/n]?
Reading changelogs... Done
(Reading database ... 276293 files and directories currently installed.)
Preparing to replace google-chrome-unstable 4.0.249.22-r33427 (using .../google-chrome-unstable_4.0.249.30-r33928_i386.deb) ...
Unpacking replacement google-chrome-unstable ...
Preparing to replace ntpdate 1:4.2.4p6+dfsg-1ubuntu5 (using .../ntpdate_1%3a4.2.4p6+dfsg-1ubuntu5.1_i386.deb) ...
Unpacking replacement ntpdate ...
Preparing to replace grub-common 1.97~beta4-1ubuntu4 (using .../grub-common_1.97~beta4-1ubuntu4.1_i386.deb) ...
Unpacking replacement grub-common ...
Processing triggers for menu ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for sreadahead ...
/var/lib/dpkg/info/sreadahead.postinst called with unknown argument `triggered'
dpkg: subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (2)
SELECTIONS FROM /var/lib/dpkg/info/sreadahead.postinst:
#!/bin/sh -e
# This script can be called in the following ways:
...
# After a trigger is activated:
# <postinst> triggered <trigger-name>...
...
case "$1" in
configure)
...
;;
abort-upgrade|abort-deconfigure|abort-remove)
;;
*)
echo "$0 called with unknown argument \`$1'" 1>&2
exit 1
;;
esac
I previously had sreadahead 1.0-5 installed. karmic-updates recently supplied me with
replacements ureadahead 0.90.3-2 and (transitional) sreadahead 1:0.90.3-2.
MANUAL REPRODUCTION:
root at goose:~# dpkg-trigger --by-package=sreadahead /etc/init.d
root at goose:~# dpkg --triggers-only sreadahead
Processing triggers for sreadahead ...
/var/lib/dpkg/info/sreadahead.postinst called with unknown argument `triggered'
dpkg: error processing sreadahead (--triggers-only):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
sreadahead
REPAIR FROM MANUAL REPRO:
root at goose:~# dpkg --configure sreadahead
Setting up sreadahead (1:0.90.3-2) ...
The sreadahead->ureadahead upgrade appears to have forgotten to remove
sreadahead's registered interest in init files:
root at goose:~# tail -4 /var/lib/dpkg/triggers/File
/etc/init sreadahead
/etc/init.d sreadahead
/etc/init ureadahead
/etc/init.d ureadahead
This might be purely a local mishap. I had moved back and forth
between old-sreadahead and new-ureadahead while testing their relative
performance, might have messed it up somehow.
Anyway, just adding "triggered" to the list of no-op actions in
sreadahead's postinst script would fix this regardless of how someone
got there:
root at goose:~# diff -up /var/lib/dpkg/info/sreadahead.postinst{.orig,}
--- /var/lib/dpkg/info/sreadahead.postinst.orig 2009-11-10 01:33:06.000000000 -0800
+++ /var/lib/dpkg/info/sreadahead.postinst 2009-12-08 23:37:46.000000000 -0800
@@ -42,7 +42,7 @@ case "$1" in
fi
;;
- abort-upgrade|abort-deconfigure|abort-remove)
+ abort-upgrade|abort-deconfigure|abort-remove|triggered)
;;
*)
root at goose:~# dpkg-trigger --by-package=sreadahead /etc/init.d
root at goose:~# dpkg --triggers-only sreadahead
Processing triggers for sreadahead ...
root at goose:~#
ProblemType: Bug
Architecture: i386
Date: Tue Dec 8 23:07:46 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: sreadahead 1:0.90.3-2
ProcEnviron:
PATH=(custom, user)
LANG=C
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.52-generic
SourcePackage: ureadahead
Uname: Linux 2.6.31-16-generic i686
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/494350/+subscriptions
More information about the foundations-bugs
mailing list