Package: approx
Version: 2.8.0
Severity: normal
Tags: patch
Hello,
after moving approx to a different machine, I removed but didn't purge
it. After that, the configured cron.weekly job fails with:
/etc/cron.weekly/approx: line 5: /usr/sbin/gc_approx: No such file
or directory
run-parts: /etc/cron.weekly/approx exited with return code 1
Also, since I moved everything out of /var/cache/approx to the other
machine, i.e. /var/cache/approx is empty, the second part of the
cron.weekly job fails as well with:
rmdir: /var/cache/approx/.: Invalid argument
Attached is a patch to fix these problems.
Kind regards
Wolfgang Karall
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-686
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages approx depends on:
ii adduser 3.101 Add and remove users and groups
ii bzip2 1.0.3-6 high-quality block-sorting file co
ii curl 7.15.5-1 Get a file from an HTTP, HTTPS, FT
ii libc6 2.3.6.ds1-9 GNU C Library: Shared libraries
ii libpcre3 6.7-1 Perl 5 Compatible Regular Expressi
ii lsb-base 3.1-22 Linux Standard Base 3.1 init scrip
approx recommends no packages.
--- /etc/cron.weekly/approx.orig 2006-12-28 13:11:47.000000000 +0100
+++ /etc/cron.weekly/approx 2006-12-28 13:11:04.000000000 +0100
@@ -2,9 +2,9 @@
# Garbage collect the approx(8) cache
-/usr/sbin/gc_approx --quiet
+[ -x /usr/sbin/gc_approx ] && /usr/sbin/gc_approx --quiet
# Remove any empty directories
# The trailing /. makes it work when /var/cache/approx is a symlink
-find /var/cache/approx/. -type d -empty | xargs --no-run-if-empty rmdir
+find /var/cache/approx/. -mindepth 1 -type d -empty | xargs --no-run-if-empty
rmdir