]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
* apt-pkg/deb/dpkgpm.cc:
[apt.git] / debian / apt.cron.daily
index 9afc553ae31a145e253828eff671bfd2a6ffc549..8e46651b2a673957b5de3b9b1c4b855777dd97f5 100644 (file)
@@ -417,25 +417,17 @@ 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 ] &&
    [ $AutocleanInterval -eq 0 ]; then
-    exit 0
-fi
 
-# set the proxy based on the admin users gconf settings
-admin_user=$(getent group admin|cut -d: -f4|cut -d, -f1)
-if [ -n "$admin_user" ] && [ -x /usr/bin/sudo ] && [ -z "$http_proxy" ] && [ -x /usr/bin/gconftool ]; then
-       use=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/use_http_proxy 2>/dev/null)
-       host=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/host 2>/dev/null)
-       port=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/port 2>/dev/null)
-       if [ "$use" = "true" ] && [ -n "$host" ] && [ -n "$port" ]; then
-               export http_proxy="http://$host:$port/"
-       fi
-fi
+    # check cache size
+    check_size_constraints
 
+    exit 0
+fi
 
 # deal with BackupArchiveInterval
 do_cache_backup $BackupArchiveInterval