diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-21 20:13:29 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-21 20:13:29 +0200 |
commit | 49f0a5615addcd66e37e0cc4915e42e4c9953054 (patch) | |
tree | dd59f7b8ec45dae9135884d5d92205463bfc536f /debian | |
parent | d59725349555939d39af81cf7746069d6aa3536c (diff) | |
parent | aff278bfea6ebb29cad5de272eb9539057ddd3bd (diff) |
merged from the mvo branch
Diffstat (limited to 'debian')
-rw-r--r-- | debian/apt.cron.daily | 8 | ||||
-rw-r--r-- | debian/changelog | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 3cf1e28f1..4f47ccfab 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -360,7 +360,7 @@ if which on_ac_power >/dev/null; then fi # check if we can lock the cache and if the cache is clean -if which apt-get >/dev/null && ! apt-get check $XAPTOPT $XSTDERR ; then +if which apt-get >/dev/null && ! eval apt-get check -f $XAPTOPT $XSTDERR ; then debug_echo "error encountered in cron job with \"apt-get check\"." exit 0 fi @@ -403,6 +403,7 @@ do_cache_backup $BackupArchiveInterval random_sleep # update package lists +UPDATED=0 UPDATE_STAMP=/var/lib/apt/periodic/update-stamp if check_stamp $UPDATE_STAMP $UpdateInterval; then if eval apt-get $XAPTOPT -y update $XSTDERR; then @@ -417,6 +418,7 @@ if check_stamp $UPDATE_STAMP $UpdateInterval; then debug_echo "dbus signal not send (command not available)" fi update_stamp $UPDATE_STAMP + UPDATED=1 else debug_echo "download updated metadata (error)" fi @@ -426,7 +428,7 @@ fi # download all upgradeable packages (if it is requested) DOWNLOAD_UPGRADEABLE_STAMP=/var/lib/apt/periodic/download-upgradeable-stamp -if check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then +if [ $UPDATED -eq 1 ] && check_stamp $DOWNLOAD_UPGRADEABLE_STAMP $DownloadUpgradeableInterval; then if eval apt-get $XAPTOPT -y -d dist-upgrade $XSTDERR; then update_stamp $DOWNLOAD_UPGRADEABLE_STAMP debug_echo "download upgradable (success)" @@ -439,7 +441,7 @@ fi # auto upgrade all upgradeable packages UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp -if which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then +if [ $UPDATED -eq 1 ] && which unattended-upgrade >/dev/null && check_stamp $UPGRADE_STAMP $UnattendedUpgradeInterval; then if unattended-upgrade $XUUPOPT; then update_stamp $UPGRADE_STAMP debug_echo "unattended-upgrade (success)" diff --git a/debian/changelog b/debian/changelog index 970c7029f..b379313e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -68,6 +68,8 @@ apt (0.7.22) UNRELEASED; urgency=low * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144) + * Only run Download-Upgradable and Unattended-Upgrades if the initial + update was successful Closes: #341970 * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files @@ -108,8 +110,6 @@ apt (0.7.22) UNRELEASED; urgency=low * Updated cron script to support backups by hardlinks and verbose levels. All features turned off by default. * Added more error handlings. Closes: #438803, #462734, #454989, - * Refactored condition structure to make download and upgrade performed - if only previous steps succeeded. Closes: #341970 * Documented all cron script related configuration items in configure-index. |