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

Playing with dpkg's mind



Hi,

I want to move the various interactive fiction games from their own
packages to management by a common "installer" package. See #107245
and related bugs. The installer package will own the various games;
any transition packages must end up not containing the respective game
file so that the transition package can be safely removed without
purging the game file as well.

I came up with various solutions and can't decide on either one.
Someone give me a clue?

In following I call the old version of the package OP, the transition
package TP, and the game file I want to keep GF.

1. If TP is installed over OP it fiddles with
   /var/lib/dpkg/info/OP.list so that GF is no longer in there. This
   is done in TP's preinst. The subsequent removal of OP should not
   remove GF.

2. Ship GF with TP, and in TP's postinst configure stage, remove GF
   from TP.list. If the admin remove TP later on, GF should stay.

3. Include GF in TP in a different location as GF' (like
   /usr/share/games/zcode-transition). In the postinst, hardlink GF'
   to its proper place GF. Removal of TP will delete GF', but GF will
   stay behind.

4. Same as 3, but copy instead of hardlink.

5. Include nothing in TP, and let the installer download GF.

The dis/advantages as I see them:

1 saves the most bandwidth, while 2-4 include the exact same GF that
was already installed. 5 does not include it in the deb but you have
to fetch it from another location still.

1 and 2 are dirty as they mess with dpkg's mind.

4 wastes space while TP is installed (by holding a dupe of GF on the
disk).

3 may not work (I'm not positive how dpkg fares with multiply-linked
files).

1 did not work in my tests. It seems that dpkg reads in the .list file
before the preinst is executed, so that script is not able to decieve
dpkg.

5 while being cleanest, inconveniences users without a
convenient/cheap net connection. Such a user may be a bit upset at
installing TP from a CD, only to discover that it removed a file that
he now has to fetch anew from the Internet.

Im leaning towards 2.

-- 
Robbe

Attachment: signature.ng
Description: PGP signature


Reply to: