When someone remove the koha-common in debian squeeze the cron jobs that are automatically added at the time of installation are not automatically removed even after the complete removal of the koha-common package.
Hi, thanks for reporting this. I hope to do some work on the packages in the start of the week coming, so will try to look at it then. One thing, can you tell me whether or not you modified the cronjob files or not in between installing and removing them? Also, if you don't mind trying a bit more, I'd be interested to know if doing 'apt-get purge koha-common' rather than 'apt-get remove koha-common' makes a difference, either way they _should_ get removed, it's just another data point.
> Hi, thanks for reporting this. I hope to do some work on the packages in the > start of the week coming, so will try to look at it then. cool > One thing, can you tell me whether or not you modified the cronjob files or not > in between installing and removing them? No , I haven't done any change in it. > Also, if you don't mind trying a bit more, I'd be interested to know if doing > 'apt-get purge koha-common' rather than 'apt-get remove koha-common' makes a > difference, either way they _should_ get removed, it's just another data point. -- The problem is that when we remove the koha-common package using <apt-get remove koha-common> the service koha-common continues to run in the background , as so as the cron job. as far as 'apt-get purge koha-common' is concerned I will soon try it out , and reply back to you.
I wonder if purge was ever tried?
apt-get purge koha-common worked fine. Now jobs are also deleted. Thanks :) Sorry for the late response.
apt-get remove isn't supposed to remove config files, only binary files. /etc/cron.d/koha-common is a config file, so this is expected. Reference: http://linuxprograms.wordpress.com/2010/05/12/dpkg-purge-versus-remove/ (and I'm sure there are other more authoritative sources; that's just the first thing I found via Google) Note that this does mean the content of /etc/cron.d/koha-common has a bug; in 3.18 at least, one of the entries protects against that situation when the command it's going to execute is not executable (which covers when it's missing): */5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra -q $(koha-list --enabled) However, the other entry doesn't, so will likely cause permission denied or file not found errors if the package is removed not purged: */15 * * * * root koha-foreach --enabled --email /usr/share/koha/bin/cronjobs/process_message_queue.pl That command should probably have a "test -x XXX &&" prefix.
Yep, I just looked in policy: https://www.debian.org/doc/debian-policy/ch-files.html#s10.7.3 and cron files are explicitly conffiles (defined in 10.7.1.) So stay they will. However, Stephen is totally correct, we should be testing for the existence of everything before executing it.
As the discussion on this bug indicates that not removing the cronjobs is intended as they are configuration files, but at the same time, there might a different bug... can someone understanding this all rephrase the bug title? :)
The cronjob files have all been updated at this point