]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
* apt-pkg/deb/dpkgpm.cc:
[apt.git] / debian / apt.cron.daily
index 3973e63b5c93bd8e0efe2d706d0d5eddffbf5dee..e59b05ee484534bb0d74bb59718f8cf7fdba1593 100644 (file)
 #    
 #  APT::Periodic::Download-Upgradeable-Packages "0";
 #  - Do "apt-get upgrade --download-only" every n-days (0=disable)
-# 
+#
+#  APT::Periodic::Download-Upgradeable-Packages-Debdelta "1";
+#  - Use debdelta-upgrade to download updates if available (0=disable)
+#
 #  APT::Periodic::Unattended-Upgrade "0";
 #  - Run the "unattended-upgrade" security upgrade script 
 #    every n-days (0=disabled)
@@ -326,7 +329,7 @@ fi
 AutoAptEnable=1  # default is yes
 eval $(apt-config shell AutoAptEnable APT::Periodic::Enable)
 
-if [ AutoAptEnable -eq 0 ]; then
+if [ $AutoAptEnable -eq 0 ]; then
     exit 0
 fi
 
@@ -395,12 +398,19 @@ eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval)
 BackupArchiveInterval=0
 eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval)
 
-# check if we actually have to do anything
+Debdelta=1
+eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta)
+
+# 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
 
@@ -438,6 +448,9 @@ fi
 # download all upgradeable packages (if it is requested)
 DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp
 if [ $UPDATED -eq 1 ] && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then
+    if [ $Debdelta -eq 1 ]; then
+        debdelta-upgrade >/dev/null 2>&1 || true
+    fi
     if  eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then
        update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
        debug_echo "download upgradable (success)"