Re: dpkg reassembly of split packages, when to purge
Bill Mitchell writes:
>On Sun, 10 Sep 1995, Ian Jackson wrote:
>> [...], should I do a full cleanup at some point in dpkg or
>> dselect's operation ? At boot time ?
>> Note that the parts of the package have to be kept by dpkg between
>> invocations, [...]
>I'd say clean out any leftover package fragments on exiting dselect.
>Possibly clean up completely at boot time, or perhaps clean up
>packages N days old or older (N=1?). You might want to introduce a
>/etc/dpkg.conf file to set aging for unconfigured packages. dpkg
>could be invoked during boot with a --cleanup option or somesuch, and
>might default the aging parameter, process the dpkg.conf file to
>perhaps update the aging parameter, and then do cleanup operations on
>over-age unconfigured packages.
I think we need to analyse why there may be leftover fragments.
I think one important reason would be that the operator has for some
reason failed to transfer all the fragments they need to their machine
- perhaps simply because of forgetfulness, or perhaps because of some
kind of data transfer error.
In this case there is almost no time when deleting the fragments is
appropriate. When they exit dselect the next thing they probably do
is go and get good copies of the missing parts - they don't want to
return to find dselect has automatically deleted all the stuff they
(Basing it on anything to do with dselect also doesn't work with those
users who prefer to use dpkg in the raw.)
Doing it at boot time has the same problem: if they are getting Debian
over a net connection e.g. at work then it's perfectly believable that
they shut their machine down while at work. Imagine the frustration
on turning the machine on after a tiring day and the first thing it
does is delete those precious files!
This one is also an argument against making the automatic expiry
period as short as one day.
What I think should happen is automatic notification of incomplete
package fragments - perhaps anything older than (about) two or three
days should be reported to the system administrator, but not deleted.
Further, I think that after a week it's reasonable to assume that
they'll have moved the fragment somewhere safe, or have lost interest
in it in which case it can be removed. A week may be too long here,
but I don't think it's too short.