summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-09-15 13:24:51 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-09-15 13:24:51 +0200
commitc1cde32ed651337684f52f9aee6eead01b70d352 (patch)
tree61380c8833b47cb52f3f25102eacc864d37b7bee /debian
parent58d9e6e0f9bf93724637c8a5687fe22058fc75a1 (diff)
* debian/apt.cron.daily:
- handle absolut directory paths correctly by loading directories directly instead of building the paths on our own (Closes: #596421)
Diffstat (limited to 'debian')
-rw-r--r--debian/apt.cron.daily43
-rw-r--r--debian/changelog5
2 files changed, 19 insertions, 29 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 8c0e4c416..8ace14a31 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -11,7 +11,7 @@
# Dir::Cache "var/apt/cache/";
# - Set apt package cache directory
#
-# Dir::Cache::Archive "archives/";
+# Dir::Cache::Archives "archives/";
# - Set package archive directory
#
# APT::Periodic::Enable "1";
@@ -147,21 +147,14 @@ check_size_constraints()
eval $(apt-config shell MaxSize APT::Archives::MaxSize)
eval $(apt-config shell MaxSize APT::Periodic::MaxSize)
- CacheDir="var/cache/apt/"
- eval $(apt-config shell CacheDir Dir::Cache)
- CacheDir=${CacheDir%/}
-
- CacheArchive="archives/"
- eval $(apt-config shell CacheArchive Dir::Cache::archives)
- CacheArchive=${CacheArchive%/}
+ Cache="/var/cache/apt/archives/"
+ eval $(apt-config shell Cache Dir::Cache::archives/d)
# sanity check
- if [ -z "$CacheDir" -o -z "$CacheArchive" ]; then
- echo "empty Dir::Cache or Dir::Cache::archives, exiting"
+ if [ -z "$Cache" ]; then
+ echo "empty Dir::Cache::archives, exiting"
exit
fi
-
- Cache="${Dir%/}/${CacheDir%/}/${CacheArchive%/}/"
# check age
if [ ! $MaxAge -eq 0 ] && [ ! $MinAge -eq 0 ]; then
@@ -225,22 +218,17 @@ do_cache_backup()
fi
# Set default values and normalize
- Dir="/"
- eval $(apt-config shell Dir Dir)
- Dir=${Dir%/}
-
- CacheDir="var/cache/apt/"
- eval $(apt-config shell CacheDir Dir::Cache)
+ CacheDir="/var/cache/apt"
+ eval $(apt-config shell CacheDir Dir::Cache/d)
CacheDir=${CacheDir%/}
if [ -z "$CacheDir" ]; then
debug_echo "practically empty Dir::Cache, exiting"
return 0
fi
- CacheArchive="archives/"
- eval $(apt-config shell CacheArchive Dir::Cache::Archives)
- CacheArchive=${CacheArchive%/}
- if [ -z "$CacheArchive" ]; then
+ Cache="${CacheDir}/archives/"
+ eval $(apt-config shell Cache Dir::Cache::Archives/d)
+ if [ -z "$Cache" ]; then
debug_echo "practically empty Dir::Cache::archives, exiting"
return 0
fi
@@ -251,16 +239,15 @@ do_cache_backup()
BackupLevel=2 ;
fi
- CacheBackup="backup/"
- eval $(apt-config shell CacheBackup Dir::Cache::Backup)
- CacheBackup=${CacheBackup%/}
- if [ -z "$CacheBackup" ]; then
+ Back="${CacheDir}/backup/"
+ eval $(apt-config shell Back Dir::Cache::Backup/d)
+ if [ -z "$Back" ]; then
echo "practically empty Dir::Cache::Backup, exiting" 1>&2
return
fi
- Cache="${Dir}/${CacheDir}/${CacheArchive}/"
- Back="${Dir}/${CacheDir}/${CacheBackup}/"
+ CacheArchive="$(basename "${Cache}")"
+ test -n "${CacheArchive}" || CacheArchive="archives"
BackX="${Back}${CacheArchive}/"
for x in $(seq 0 1 $((${BackupLevel}-1))); do
eval "Back${x}=${Back}${x}/"
diff --git a/debian/changelog b/debian/changelog
index 174a263a9..bc862870b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,11 @@ apt (0.8.5) UNRELEASED; urgency=low
as requested by the backports crew (Closes: #596097)
* apt-pkg/deb/deblistparser.cc:
- overrule NotAutomatic in case of ButAutomaticUpgrades
+ * debian/apt.cron.daily:
+ - handle absolut directory paths correctly by loading directories
+ directly instead of building the paths on our own (Closes: #596421)
- -- David Kalnischkies <kalnischkies@gmail.com> Tue, 14 Sep 2010 18:56:23 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com> Wed, 15 Sep 2010 13:24:16 +0200
apt (0.8.4) unstable; urgency=low