summaryrefslogtreecommitdiff
path: root/debian/apt.cron.daily
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-07-09 08:24:46 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-07-09 08:24:46 +0200
commite77aedb863e2a9eebb5aa9628121d350c029527d (patch)
treedc314b4157aba3fa9a67c2d2e9c56a410ded4ec7 /debian/apt.cron.daily
parentf52074eed3849ae7c7ebae3c3a118cd4ee094b32 (diff)
parent25792e39cf2218f1c9bae74217e4f91682e14837 (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'debian/apt.cron.daily')
-rw-r--r--debian/apt.cron.daily14
1 files changed, 8 insertions, 6 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily
index 6f6dc92a4..5c00f22db 100644
--- a/debian/apt.cron.daily
+++ b/debian/apt.cron.daily
@@ -327,12 +327,14 @@ check_power(){
# ------------------------ main ----------------------------
-# Backup the 7 last versions of APT's extended_states file
-# shameless copy from dpkg cron
-if cd /var/backups ; then
- if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then
- cp -p /var/lib/apt/extended_states apt.extended_states
- savelog -c 7 apt.extended_states >/dev/null
+if test -r /var/lib/apt/extended_states; then
+ # Backup the 7 last versions of APT's extended_states file
+ # shameless copy from dpkg cron
+ if cd /var/backups ; then
+ if ! cmp -s apt.extended_states.0 /var/lib/apt/extended_states; then
+ cp -p /var/lib/apt/extended_states apt.extended_states
+ savelog -c 7 apt.extended_states >/dev/null
+ fi
fi
fi