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

Re: cron job to clean out old cat pages

Robert Sanders wrote:
> I'm conteplating writing a perl script to clean out cat pages
> [details deleted]
>  My main problem is that, if
> this becomes a standard part of the root crontab, what happens if
> the user doesn't install perl?

There are several possible approaches to this.

Clearly such a script requires the cron, man and perl packages, so it
could either be put in with one of those or in a separate package.

If it goes in a separate package there is no problem - arrange for it
to require (according to the marvellous new packaging control-over-
own-destiny which I hope is on its way) the other three.  The
post-install script would modify the root crontab to run it.

If it goes in one of the other packages it's not that hard either -
the post-install script of that package needs to check to see whether
the other two packages are present, and if so to enable it (telling
the user it has done so, presumably).  Otherwise it could tell the
user that the script has not been enabled and ask them to run a script
if they want to enable it later when they have the prerequesites.

One interesting point - would it be possible to add a hook to the
packaging system that said "when you install package XYZ, let me know
by calling this script" ?  That would make it much easier to do cope
with this kind of rather messy interaction between packages.


Reply to: