[Bug 565229] Re: /etc/cron.daily/apt assumes that CacheArchive inside CacheDir
Torsten Spindler
torsten at canonical.com
Thu Mar 1 08:44:31 UTC 2012
The code for the cron job has changed since the bug was reported:
Cache="/var/cache/apt/archives/"
eval $(apt-config shell Cache Dir::Cache::archives/d)
Does this allow for the intended behaviour of having a CacheArchive
outside of CacheDir?
** Changed in: apt (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/565229
Title:
/etc/cron.daily/apt assumes that CacheArchive inside CacheDir
Status in “apt” package in Ubuntu:
Incomplete
Bug description:
Binary package hint: apt
cron apt script assumes that CacheArchive directory is inside CacheDir. However, apt allows configuration when CacheArchive is outside CacheDir (for example, I use it because of space shortage in /var).
Some changes to /etc/cron.daily/apt like this would be useful...
--- /etc/cron.daily/apt 2010-04-17 11:42:26.000000000 +0400
+++ tmp/apt 2010-04-17 11:45:38.000000000 +0400
@@ -181,7 +181,11 @@
exit
fi
- Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/"
+ if [ "x$CacheArchive" != "x${CacheArchive#/}" ]; then
+ Cache="${CacheArchive%/}/";
+ else
+ Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/";
+ fi
# check age
if [ ! $MaxAge -eq 0 ] && [ ! $MinAge -eq 0 ]; then
@@ -279,7 +283,13 @@
return
fi
- Cache="${Dir}/${CacheDir}/${CacheArchive}/"
+
+ if [ "x$CacheArchive" != "x${CacheArchive#/}" ]; then
+ Cache="${CacheArchive%/}/";
+ else
+ Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/";
+ fi
+
Back="${Dir}/${CacheDir}/${CacheBackup}/"
BackX="${Back}${CacheArchive}/"
for x in $(seq 0 1 $((${BackupLevel}-1))); do
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/565229/+subscriptions
More information about the foundations-bugs
mailing list