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

Debian package scripts



Howdy.

The current behavior where upgrades can cause interruptions in service
without allowing for administrator intervention is a problem.
`start-stop-daemon' is an excellent program, but upgrade scripts
should not be so cavalier about running it.

The original design of the Debian package maintenance process only
considered 4 places where scripts could be usefully run.  Before and
after package installation and removal.  I think this model, for which
I am partially to blame (ask Ian Murdock), is lacking.  Here is why:

* There should be a separate functionality for package update.
  The act of upgrading a package is fundamentally different from
  removing it and deciding to install it again later.

* Four separate scripts may be required.  On average, this wastes 512
  bytes of disk space per script due to internal fragmentation.
  Scripts are run very infrequently and thus could be combined in a
  single script, (also possibly sharing some code between functions).

I therefore propose that a new type of package maintenance script be
created, "<name>.maint", where arguments define the position in the
processing:

  * before/after initial installation
  * before/after final removal
  * before/after removal in the update/upgrade process
  * before/after installation in the update/upgrade process
  * ???

Some of these will be equivalent in many packages, but the finer
granularity would be good.

Older packages could continue to use the four separate scripts for a
while, but I think it's clear that using a single script will help
save space, help reuse code, and offer the opportunity to add new
functionality without adding new scripts.  /var/lib/dpkg/info is
getting a bit crowded too.

Dan

-- 
Daniel Quinlan                  http://www.pathname.com/~quinlan
quinlan@pathname.com            quinlan@transmeta.com (at work)

--
This message was distributed manually by Bruce@debian.org after the list
initially failed to distribute it.


Reply to: