]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
* apt-pkg/pkgcachegen.cc:
[apt.git] / debian / apt.cron.daily
index 69f97a36b9bd81186b7c4ade8359a36820a224e0..5c00f22db11b9e5af618df3ef75e84c88ab190a5 100644 (file)
@@ -8,7 +8,7 @@
 #  Dir "/";
 #  - RootDir for all configuration files
 #
-#  Dir::Cache "var/apt/cache/";
+#  Dir::Cache "var/cache/apt/";
 #  - Set apt package cache directory
 #
 #  Dir::Cache::Archives "archives/";
@@ -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