From 6985efb330487fb4ceb3fea0b4bfc86010c6d7f8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 6 Aug 2009 12:12:20 +0200 Subject: debian/apt.cron.daily: Make sure that VERBOSE is always set before accessing it (Closes: #539366) --- debian/apt.cron.daily | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'debian/apt.cron.daily') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 4f47ccfab..35ee5db6c 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -320,11 +320,9 @@ if ! which apt-config >/dev/null ; then fi # Set VERBOSE mode from apt-config (or inherit from environment) +VERBOSE=0 eval $(apt-config shell VERBOSE APT::Periodic::Verbose) debug_echo "verbose level $VERBOSE" -if [ -z "$VERBOSE" ]; then - VERBOSE="0" -fi if [ "$VERBOSE" -le 2 ]; then # quiet for 0,1,2 XSTDOUT=">/dev/null" -- cgit v1.2.3-70-g09d2 From 17443d48b60b1abad4d16a2b6a3e3b3199bfa7d3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 6 Aug 2009 12:33:57 +0200 Subject: debian/apt.cron.daily: Script can be disabled by APT::Periodic::Enable=0 (Closes: #485476) --- debian/apt.cron.daily | 11 +++++++++++ debian/changelog | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'debian/apt.cron.daily') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 35ee5db6c..3973e63b5 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -14,6 +14,9 @@ # Dir::Cache::Archive "archives/"; # - Set package archive directory # +# APT::Periodic::Enable "1"; +# - Enable the update/upgrade script (0=disable) +# # APT::Periodic::BackupArchiveInterval "0"; # - Backup after n-days if archive contents changed.(0=disable) # @@ -319,6 +322,14 @@ if ! which apt-config >/dev/null ; then exit 0 fi +# check if the user really wants to do something +AutoAptEnable=1 # default is yes +eval $(apt-config shell AutoAptEnable APT::Periodic::Enable) + +if [ AutoAptEnable -eq 0 ]; then + exit 0 +fi + # Set VERBOSE mode from apt-config (or inherit from environment) VERBOSE=0 eval $(apt-config shell VERBOSE APT::Periodic::Verbose) diff --git a/debian/changelog b/debian/changelog index 377cc6b57..21772e5df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ apt (0.7.22.2) unstable; urgency=low - * debian/apt.cron.daily: Make sure that VERBOSE is always set - before accessing it (Closes: #539366) + * debian/apt.cron.daily: + - Make sure that VERBOSE is always set (Closes: #539366) + - Script can be disabled by APT::Periodic::Enable=0 (Closes: #485476) - -- Julian Andres Klode Thu, 06 Aug 2009 12:07:55 +0200 + -- Julian Andres Klode Thu, 06 Aug 2009 12:17:19 +0200 apt (0.7.22.1) unstable; urgency=low -- cgit v1.2.3-70-g09d2 From 6b519e4227f41980b6de18a882808df92f1e36f1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 6 Aug 2009 12:48:41 +0200 Subject: debian/apt.cron.daily: Support using debdelta to download packages (Closes: #532079) --- debian/apt.cron.daily | 11 ++++++++++- debian/changelog | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'debian/apt.cron.daily') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 3973e63b5..a09eeaca8 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -49,7 +49,10 @@ # # 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) @@ -395,6 +398,9 @@ eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval) BackupArchiveInterval=0 eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterval) +Debdelta=1 +eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta) + # check if we actually have to do anything if [ $UpdateInterval -eq 0 ] && [ $DownloadUpgradeableInterval -eq 0 ] && @@ -438,6 +444,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)" diff --git a/debian/changelog b/debian/changelog index 21772e5df..2d3446d48 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ apt (0.7.22.2) unstable; urgency=low * debian/apt.cron.daily: - Make sure that VERBOSE is always set (Closes: #539366) - Script can be disabled by APT::Periodic::Enable=0 (Closes: #485476) + - Support using debdelta to download packages (Closes: #532079) -- Julian Andres Klode Thu, 06 Aug 2009 12:17:19 +0200 -- cgit v1.2.3-70-g09d2 From 9a64707c285290c4e191e04d92c0fab9f6f118f5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 6 Aug 2009 12:54:27 +0200 Subject: debian/apt.cron.daily: Fix issue related to APT::Periodic::Enable. --- debian/apt.cron.daily | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/apt.cron.daily') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index a09eeaca8..b6099ee75 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -329,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 -- cgit v1.2.3-70-g09d2