]> git.saurik.com Git - apt.git/blobdiff - debian/apt.cron.daily
releasing version 0.7.25.3ubuntu4
[apt.git] / debian / apt.cron.daily
index 328282a41cae9c92e71feb1129fdbae0b5723982..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
@@ -454,7 +446,7 @@ if check_stamp $UPDATE_STAMP $UpdateInterval; then
     else
        debug_echo "apt-key net-update (failure)"
     fi
-    if eval apt-get $XAPTOPT -y update -o APT::Update::Auth-Failure::="cp /usr/share/apt/apt-auth-failure.note /var/lib/update-notifier/user.d/" $XSTDERR; then
+    if eval apt-get $XAPTOPT -y update -o APT::Update::Auth-Failure::=\"cp /usr/share/apt/apt-auth-failure.note /var/lib/update-notifier/user.d/\" $XSTDERR; then
        debug_echo "download updated metadata (success)."
        if which dbus-send >/dev/null && pidof dbus-daemon >/dev/null; then
            if dbus-send --system / app.apt.dbus.updated boolean:true ; then