aborting installation of a package in the preinst
-----BEGIN PGP SIGNED MESSAGE-----
I thought that the way to abort a package installation was to have a
failure exit from the preinst. This worked some. When I told
perl-5.005-base to not install, it didn't. But unfortunately, dpkg
proceeded to unpack the packages that depend on perl-5.005-base. I
would expect that a failed installation would fail those packages that
depend on it as well.
If there isn't another way to tell dpkg to not continue with unpacking
the dependent packages, I'll have to change it to just an alert notice
since I wouldn't want to have someone have the perl-5.005 packages
unpacked but not configured. That would be icky.
Here's the dpkg interaction dialog:
Selecting previously deselected package perl-5.005-base.
(Reading database ... 69487 files and directories currently installed.)
Unpacking perl-5.005-base (from /var/cache/apt/archives/perl-5.005-base_5.005.03-0.8_i386.deb) ...
This version of Perl is using the newer Berkeley DB 2 files.
They are incompatible with the Berkeley DB 1.85 files that
you have (probably) been using.
Please use perl-5.004 to work with these db's until you can
convert them over.
You can use Perl-5.004 to dump these databases and reload
them with Perl-5.005.
Or you can use db_dump185(1) and db_load(1) utilities that
come with the libc6 package.
Would you like to continue? [yN]
dpkg: error processing /var/cache/apt/archives/perl-5.005-base_5.005.03-0.8_i386.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Selecting previously deselected package perl-5.005.
Unpacking perl-5.005 (from /var/cache/apt/archives/perl-5.005_5.005.03-0.8_i386.deb) ...
Selecting previously deselected package perl-5.005-doc.
Unpacking perl-5.005-doc (from /var/cache/apt/archives/perl-5.005-doc_5.005.03-0.8_all.deb) ...
Selecting previously deselected package perl-5.005-suid.
Unpacking perl-5.005-suid (from /var/cache/apt/archives/perl-5.005-suid_5.005.03-0.8_i386.deb) ...
Selecting previously deselected package perl-5.005-debug.
Unpacking perl-5.005-debug (from /var/cache/apt/archives/perl-5.005-debug_5.005.03-0.8_i386.deb) ...
Errors were encountered while processing:
E: Sub-process returned an error code (1)
dpkg -l 'perl-5.005*' shows us:
iU perl-5.005 5.005.03-0.8 Larry Wall's Practical Extracting and Report
in perl-5.005-base 5.005.03-0.8 (no description available)
iU perl-5.005-debu 5.005.03-0.8 View internals of Perl and debug Perl itself
iU perl-5.005-doc 5.005.03-0.8 Man pages and pod docs for Perl
iU perl-5.005-suid 5.005.03-0.8 Runs setuid Perl scripts.
Finally, the actual code for this is:
if [ -z $2 ] || dpkg --compare-versions $2 lt 5.005;then
echo "This version of Perl is using the newer Berkeley DB 2 files."
echo "They are incompatible with the Berkeley DB 1.85 files that"
echo "you have (probably) been using."
echo "Please use perl-5.004 to work with these db's until you can"
echo "convert them over."
echo "You can use Perl-5.004 to dump these databases and reload"
echo "them with Perl-5.005."
echo "Or you can use db_dump185(1) and db_load(1) utilities that"
echo "come with the libc6 package."
echo -n "Would you like to continue? [yN] "
[ -z $yorn ] && yorn=N
case "$yorn" in
echo "Aborting installation."
echo "Unknown response. Aborting installation."
<email@example.com> <http://www.daft.com/~torin> <firstname.lastname@example.org> <email@example.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @
@ Make a little hot-tub in your soul. @
-----BEGIN PGP SIGNATURE-----
Comment: Processed by Mailcrypt 3.5.1, an Emacs/PGP interface
-----END PGP SIGNATURE-----