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

Re: do packages depend on lexical order or {daily,weekly,monthly} cron jobs?



On Mon, Jul 29, 2019 at 06:36:00PM +0100, Simon McVittie wrote:
> On Mon, 29 Jul 2019 at 18:26:22 +0100, Simon McVittie wrote:
> > Another reason to break them up is that if the same package installs
> > both a cron script like /etc/cron.daily/man-db and a systemd unit like
> > /lib/systemd/system/man-db.timer, systemd-cron deliberately generates its
> > unit to be named man-db.timer, so that it will be "shadowed" by the native
> > man-db.timer (which is in a higher-precedence directory).
> 
> As a result, systemd-cron doesn't currently do this for daily, etc. cron
> jobs (but it does for cron.d jobs).

It's also a little hard to see how it could rely on shadowing for this,
since it's permitted for e.g. /etc/cron.daily/foo and
/etc/cron.weekly/foo to both exist and do different things.

(This is the case for man-db.  When adding its systemd unit the
submitter of #858022 decided and I agreed that the differences between
the daily and weekly scripts weren't worth representing, and I might yet
change the traditional cron.* scripts to match that decision, but this
wasn't a decision that an automatic conversion system could have taken.)

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: