[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: interesting question



Package: packaging-manual
Version: 3.1.1.1

On Tue, Apr 04, 2000 at 12:48:27PM -0700, Joey Hess wrote to -devel:
> Here's an interesting hypothetical question we came up with at the
> office:
> 
> Suppose a .deb is released that does rm -rf / in its prerm. We know it
> has been installed on a bunch of machines all over the place. How can we
> safely upgrade them?
> 
> [explanation of difficulty snipped]

I just wrote a long thought about similar problems, and then realised
that I didn't understand the packaging manual, section 6.3, para 1.

Could I suggest the following rewording to clarify the issue (which
more clearly describes the behaviour of dpkg):

-----
  1. If a version the package is already installed, call 

       old-prerm upgrade new-version

-  2. If this gives an error (ie, a non-zero exit status), dpkg
-     will attempt instead: 
+  2. If the script runs but exits with a non-zero exit status, dpkg
+     will attempt:

       new-prerm failed-upgrade old-version

  Error unwind, for both the above cases: 

       old-postinst abort-upgrade new-version
-----

Still doesn't solve the problem Joey has, though.  I wonder whether
the possibility of having a "prerm-override" file would help, or
whether it would just complicate things unnecessarily.  Although I
could imagine situations in which non-malicious but still serious bugs
in prerm's could cause similar situations to arise.  Basically, in the
current setup, prerm bugs are mostly unfixable.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
        Debian GNU/Linux Developer,  see http://www.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/


Reply to: