Package: approx
Version: 5.5-1
Severity: normal
Control: tags -1 patch

Dear Maintainer,

I have an approx installation on a kfreebsd-amd64 machine. The cron job
emits the following error:

> /etc/cron.weekly/approx:
> nice: ionice: No such file or directory
> run-parts: /etc/cron.weekly/approx exited with return code 127

ionice is not available on kfreebsd-any nor on hurd-i386.

(See for example the build logs for util-linux for these ports:
https://buildd.debian.org/status/package.php?p=util-linux&suite=unstable)

It's probably easiest to check for ionice availabilty at runtime, I've
attached a patch.

Thanks,

leo

--- debian/approx.cron.weekly.orig	2015-11-30 11:06:55.784478675 +0100
+++ debian/approx.cron.weekly	2015-11-30 11:06:55.784478675 +0100
@@ -2,6 +2,12 @@
 
 # Garbage collect the approx(8) cache
 
+# only use ionice if available, kfreebsd and hurd lack it
+unset IONICE
+if [ -x /usr/bin/ionice ]; then
+    IONICE="ionice -c3"
+fi
+
 if [ -x /usr/sbin/approx-gc ]; then
-    nice -n19 ionice -c3 /usr/sbin/approx-gc --quiet
+    nice -n19 $IONICE /usr/sbin/approx-gc --quiet
 fi

Reply via email to