]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
* apt-pkg/deb/dpkgpm.cc:
[apt.git] / debian / apt.cron.daily
index b6099ee75aa30cd22b8e2c8dcf56a17aff7238ad..8c0e4c416f79c9b277b54c0d14454a099b0f1dd5 100644 (file)
@@ -320,6 +320,15 @@ debug_echo()
 
 # ------------------------ 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
+    fi
+fi
+
 # check apt-config exstance
 if ! which apt-config >/dev/null ; then
        exit 0
@@ -401,12 +410,16 @@ eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterv
 Debdelta=1
 eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta)
 
-# check if we actually have to do anything
+# check if we actually have to do anything that requires locking the cache
 if [ $UpdateInterval -eq 0 ] &&
    [ $DownloadUpgradeableInterval -eq 0 ] &&
    [ $UnattendedUpgradeInterval -eq 0 ] &&
    [ $BackupArchiveInterval -eq 0 ] &&
    [ $AutocleanInterval -eq 0 ]; then
+
+    # check cache size
+    check_size_constraints
+
     exit 0
 fi