Re: aborting installation of a package in the preinst
>>>"Darren/Torin/Who Ever..." wrote:
> 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.
Whoow. Installed debian 10 hours ago and I can answer a question :-)
7.10 What is meant by Pre-Depends?
"Pre-Depends" is a special dependency.
In the case of most packages, dpkg will unpack its archive file (i.e., its .deb file) independently of whether or not
the files on which it depends exist on the system. Simplistically, unpacking means that dpkg will extract the files
from the archive file that were meant to be installed on your filesystem, and put them in place. If those packages
depend on the existence of some other packages on your system, dpkg will refuse to complete the installation by
executing its "configure" action until the other packages are installed.
However, for some packages, dpkg will refuse even to unpack them until certain dependencies are resolved. Such
packages are said to "Pre-depend" on the presence of some other packages. The Debian project provided this
mechanism to support the safe upgrading of systems from a.out format to ELF format, where the order in which
packages were unpacked was critical.
More detailed information on the use of these terms can be found in the Debian programmer's manual.
But maybe I'm wrong,
> 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]
> Aborting installation.
> 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] "
> read yorn
> [ -z $yorn ] && yorn=N
> case "$yorn" in
> echo "Continuing."
> exit 0
> echo "Aborting installation."
> exit 1
> echo "Unknown response. Aborting installation."
> exit 1
> - --
> <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. @
If you live in the European Union and you don't like spam then
support the petition:
Vote against Spam! http://www.politik-digital.de/spam/