[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#384649: marked as done (please allow dist-upgrade in cron job)



Your message dated Sat, 08 Dec 2007 08:34:50 -0200
with message-id <87fxydmq45.fsf@lab.ossystems.com.br>
and subject line Isn't the right place for a croned dist-upgrade
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: apt
Version: 0.6.45
Severity: wishlist
Tags: patch

Attached patch adds an option to allow dist-upgrade in cron job.  Note that:

  - This option detects when a non-stable dist is present in "apt-cache policy",
    and disables the upgrade in that case.  I think it's reasonably safe to do
    automatic dist-upgrades if you're only running stable.

  - My patch adds a big warning saying that this is an experimental feature, to
    ensure noone enables it without knowing the possible implications.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
--- debian/apt.cron.daily	2006-03-02 13:48:30.000000000 +0100
+++ /etc/cron.daily/apt	2006-08-24 20:05:56.000000000 +0200
@@ -11,6 +11,11 @@
 #  "APT::Periodic::Download-Upgradeable-Packages=0",
 #  - Do "apt-get upgrade --download-only" every n-days (0=disable)
 # 
+#  "APT::Periodic::Upgrade-Packages=0",
+#  - Do "apt-get dist-upgrade" every n-days (0=disable).  THIS IS AN
+#    EXPERIMENTAL FEATURE, USE IT AT YOUR OWN RISK.  It has no effect when
+#    any distribution other than stable is present in sources.list.
+# 
 #  "APT::Periodic::AutocleanInterval"
 #  - Do "apt-get autoclean" every n-days (0=disable)
 #
@@ -144,6 +149,7 @@
 
 UpdateInterval=0
 DownloadUpgradeableInterval=0
+UpgradeInterval=0
 eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages)
 AutocleanInterval=$DownloadUpgradeableInterval
 eval $(apt-config shell AutocleanInterval APT::Periodic::Autoclean)
@@ -176,6 +182,18 @@
     update_stamp $DOWNLOAD_UPGRADEABLE_STAMP
 fi
 
+UPGRADE_STAMP=/var/lib/apt/periodic/upgrade-stamp
+if check_stamp $UPGRADE_STAMP $UpgradeInterval; then
+    # Never attempt this on non-stable distributions!
+    tmp="^     release o=\(Debian\|Ubuntu\),a="
+    if apt-cache policy | grep "${tmp}" | sed -e "s/${tmp}//g" -e "s/,.*//g" | grep -v "^stable$" > /dev/null ; then
+      exit 0
+    fi
+    unset tmp
+    apt-get -qq dist-upgrade 2>/dev/null
+    update_stamp $UPGRADE_STAMP
+fi
+
 AUTOCLEAN_STAMP=/var/lib/apt/periodic/autoclean-stamp
 if check_stamp $AUTOCLEAN_STAMP $AutocleanInterval; then
     apt-get -qq autoclean

--- End Message ---
--- Begin Message ---
Hello,

As already spot by Michael, "unattended-upgrades" is the most logical
way of supporting it and I don't think it should be done directly by
APT.

Due this concerns and since we hadn't no activity on this bug in more
then a year, I'm closing it.

Please, feel free to reopen it and start a new discussion about it if
you disagree with this.

Thanks in advance,

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."


--- End Message ---

Reply to: