summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-01-31 13:17:10 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-01-31 13:17:10 +0000
commita1af189703d6bcfdf1ab9eeac92f44a051d287f2 (patch)
tree7abbbd01f97743fdf8ca5e56a4da0150fb696ee0 /sys-apps/mlocate
parentVersion bump, remove old, dvips and latex are required (bug #345121). (diff)
downloadhistorical-a1af189703d6bcfdf1ab9eeac92f44a051d287f2.tar.gz
historical-a1af189703d6bcfdf1ab9eeac92f44a051d287f2.tar.bz2
historical-a1af189703d6bcfdf1ab9eeac92f44a051d287f2.zip
Fix premature removing of the lock file and parse the args more sanely when there is no config around. This fixes bug #353270.
Package-Manager: portage-2.2.0_alpha19/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/mlocate')
-rw-r--r--sys-apps/mlocate/ChangeLog6
-rw-r--r--sys-apps/mlocate/Manifest4
-rw-r--r--sys-apps/mlocate/files/mlocate.cron-r213
3 files changed, 13 insertions, 10 deletions
diff --git a/sys-apps/mlocate/ChangeLog b/sys-apps/mlocate/ChangeLog
index ae09305f484e..6f35c652ff79 100644
--- a/sys-apps/mlocate/ChangeLog
+++ b/sys-apps/mlocate/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/mlocate
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/mlocate/ChangeLog,v 1.84 2011/01/30 13:16:50 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mlocate/ChangeLog,v 1.85 2011/01/31 13:17:10 scarabeus Exp $
+
+ 31 Jan 2011; Tomáš Chvátal <scarabeus@gentoo.org> files/mlocate.cron-r2:
+ Fix premature removing of the lock file and parse the args more sanely when
+ there is no config around. This fixes bug #353270.
*mlocate-0.23.1-r1 (30 Jan 2011)
diff --git a/sys-apps/mlocate/Manifest b/sys-apps/mlocate/Manifest
index 94dad99d3c0e..9d0d6d32f004 100644
--- a/sys-apps/mlocate/Manifest
+++ b/sys-apps/mlocate/Manifest
@@ -1,7 +1,7 @@
AUX mlocate-cron.conf 237 RMD160 9cf92cb5bd0071f75b644fc336697176f71cabea SHA1 bf712392e377686d4d11c144e188eb09499bef59 SHA256 856c1ab465b3e7ffdf752ba323bea9867ac902297fc4247ae15a575419b279c7
-AUX mlocate.cron-r2 1260 RMD160 7df658cf3804ad7a10b10f17c841c5da066116c5 SHA1 90570f9449104bc174f25cf44d45adfe24655439 SHA256 ab3d378494c0488820e158ae2128b1548c46397d68ad1fdd8b026f0ce0030875
+AUX mlocate.cron-r2 1297 RMD160 79d86867c404c8dab046fab303de38485e06bab8 SHA1 94ec03d743758c55dc9551b16e6f74e3365c5a79 SHA256 dfceec061a018f2976f18b8ba874dc152cd9ee4595a6f9a25a6ef5307aeacae9
AUX updatedb.conf 967 RMD160 5b6dd3fe1ed0ab872608859fdedf40d69b706b53 SHA1 12e952e74e7f25d165e100e88f033a98d3848178 SHA256 afa4b1f5e7617f288ca83cfab3e8553b1ba92cb878f0f15a6f4817f31bfe9f66
DIST mlocate-0.23.1.tar.xz 347960 RMD160 d124b2f67a1a6ad1731cc3414febd8429228c88d SHA1 1c8d10a6ae8185b8e7c88091d383563650e69ece SHA256 cec92e2fd946f14d236d5e85570bddb5c487b3e1d8a6f1a2691bb1f07d696ff7
EBUILD mlocate-0.23.1-r1.ebuild 1548 RMD160 2c5db339bbbe907085993108ec199c2956bba27d SHA1 2919e5ac0b574ac41a9d3b8ef4db8af1f400ea98 SHA256 59e4653910a64b1d98915395b1b823b4afe9e53be321f8d2930d8289230e9a92
-MISC ChangeLog 10514 RMD160 6ecc6c724415921e7b3de73a2be88a73997cffea SHA1 6fbccdc9282f4fd4228da2505f53ee111d6cd9d2 SHA256 cf029dd7327b93c53777cd49dad69110f96c6dfe8039118f42d3064855644c59
+MISC ChangeLog 10724 RMD160 52ea26726d2f12beb6ea90b8024c90d80da7fdd9 SHA1 f59bbbc909ec6e85f5fc9f0f7eaa1bbb4b4c7c87 SHA256 ecf3b70f247c6468a8402f4d702088d3bfe5ff916275547cdd11a2958d90ef70
MISC metadata.xml 269 RMD160 1db2638dff49f3fd7ca729da3e275c5a21019b1f SHA1 a02ae3c5cdfde4f63a1370a7c334d9e72c4887fd SHA256 76fb556342434f4a8ba872bc6dbb7a21f625b5fbd001ee467141d6b710ae82c6
diff --git a/sys-apps/mlocate/files/mlocate.cron-r2 b/sys-apps/mlocate/files/mlocate.cron-r2
index 6babee2eae2d..51cb504977e2 100644
--- a/sys-apps/mlocate/files/mlocate.cron-r2
+++ b/sys-apps/mlocate/files/mlocate.cron-r2
@@ -12,13 +12,13 @@ fi
# check if we are already running (lockfile)
LOCKFILE="/var/lock/mlocate.daily.lock"
-trap "rm -f ${LOCKFILE}" EXIT
if [ -e "${LOCKFILE}" ]; then
echo >&2 "Warning: \"${LOCKFILE}\" already present, not running updatedb."
exit 1
-else
- touch "${LOCKFILE}"
fi
+touch "${LOCKFILE}"
+# trap the lockfile only if we really run the updatedb
+trap "rm -f ${LOCKFILE}" EXIT
# source the user specified variables
if [ -f /etc/mlocate-cron.conf ]; then
@@ -26,10 +26,9 @@ if [ -f /etc/mlocate-cron.conf ]; then
fi
# check the config file
-ARGS=""
+NODEVS=""
if [ ! -f /etc/updatedb.conf ]; then
- nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
- ARGS="-f ${nodevs}"
+ NODEVS=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
fi
# alter the priority of the updatedb process
@@ -42,7 +41,7 @@ fi
# run the updatedb if possible
if [ -x /usr/bin/updatedb ]; then
- /usr/bin/updatedb ${ARGS}
+ /usr/bin/updatedb -f "${NODEVS}"
else
echo >&2 "Warning: \"/usr/bin/updatedb\" is not executable, unable to run updatedb."
exit 0