diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/apt.cron.daily | 26 | ||||
-rw-r--r-- | debian/changelog | 10 |
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 7af689e1f..ec53a7f2f 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -147,6 +147,25 @@ check_size_constraints() fi } +# sleep for a random intervall of time (default 30min) +# (some code taken from cron-apt, thanks) +random_sleep() +{ + RandomSleep=1800 + eval $(apt-config shell RandomSleep APT::Periodic::RandomSleep) + if [ $RandomSleep -eq 0 ]; then + return + fi + if [ -z "$RANDOM" ] ; then + # A fix for shells that do not have this bash feature. + RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5") + fi + TIME=$(($RANDOM % $RandomSleep)) + sleep $TIME +} + +# main + if ! which apt-config >/dev/null; then exit 0 fi @@ -179,6 +198,13 @@ if ! apt-get check -q -q 2>/dev/null; then exit 1 fi +# sleep random amount of time +random_sleep + +# check again if we can access the cache +if ! apt-get check -q -q 2>/dev/null; then + exit 1 +fi UPDATE_STAMP=/var/lib/apt/periodic/update-stamp if check_stamp $UPDATE_STAMP $UpdateInterval; then diff --git a/debian/changelog b/debian/changelog index 4b0195979..ff2d56cc6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,16 @@ apt (0.7.12) UNRELEASED; urgency=low is run * methods/connect.cc: - remember hosts with Resolve failures or connect Timeouts + * cmdline/apt-get.cc: + - fix incorrect help output for -f (LP: #57487) + - do two passes when installing tasks, first ignoring dependencies, + then resolving them and run the problemResolver at the end + so that it can correct any missing dependencies + * debian/apt.cron.daily: + - sleep random amount of time (default within 0-30min) before + starting the upate to hit the mirrors less hard + * doc/apt_preferences.5.xml: + - fix typo [ Christian Perrier ] * Fix typos in manpages. Thanks to Daniel Leidert for the fixes |