It would be nice if tmpwatch ebuild could include a reasonable cron entry for it. Anyway, tmpwatch is by nature a cron-driven program, so putting something like this (shamelessly ripped from Red Hat) to /etc/cron.daily/tmpwatch or so would be cool: --- /usr/sbin/tmpwatch 240 /tmp /usr/sbin/tmpwatch 720 /var/tmp for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do if [ -d "$d" ]; then /usr/sbin/tmpwatch -f 720 $d fi done --- Reproducible: Always Steps to Reproduce: 1. 2. 3.
As I see this package is fair game (owned by bug-wranglers), I'll be maintaining it (and taking its open bugs).
Just bumped tmpwatch to 2.9.1-1, which includes a cron script (disabled by default) installed into /etc/cron.daily. Includes examples for some common uses such as deleting old distfiles. Thanks for the report.
Forgot to mention, if for some reason you notice anything wrong with the cron script, please repoen this bug, instead of filing a new one. Thanks again.
Looks good. Thank you and keep up the good work!
Noticed a typo: #PORTAGE_TMPDIR="$(portageq envvar PORTAGE_TMP_DIR)/portage" should be #PORTAGE_TMPDIR="$(portageq envvar PORTAGE_TMPDIR)/portage"
Fixed. Thanks very much for pointing that out.
The cron script gives the following example: # Delete everything in PORTAGE_TMPDIR that hasn't been modified in 2 weeks. # #if [[ -d ${PORTAGE_TMPDIR:-/var/tmp/portage} ]]; then # ${TMPWATCH} --mtime --all 336 ${PORTAGE_TMPDIR:-/var/tmp/portage} #fi It bited me when I activated this one because the mtime of the source files unpacked in /var/tmp/portage can be earlier than what tmpwatch expects. An emerge running while this command is run can fail or leave the system in an unknown state. --mtime should be changed in --atime and the user advised to check that /var/tmp/portage isn't on a filesystem mounted with 'noatime'.
Please open a seperate bug. A patch for this would be greatly appreciated.