Your message dated Thu, 3 Feb 2011 19:22:47 +0100 with message-id <20110203182246.GB13697@bod> and subject line Re: Bug#565616: unattended-upgrades: Undeclared dependency: unatt.-upgrades wrongly assumes mailutils are always installed has caused the Debian Bug report #565616, regarding unattended-upgrades: Undeclared dependency: unatt.-upgrades wrongly assumes mailutils are always installed 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 this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 565616: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565616 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: unattended-upgrades Version: 0.25.1debian1-0.1 Severity: important Unattended-upgrades seems to work fine, and packages get upgraded automatically once they are available. But everytime a package is actually upgraded, the corresponding dpkg-logfile contains error messages, e.g.: (Reading database ... 19317 files and directories currently installed.) Preparing to replace libkrb53 1.6.dfsg.4~beta1-5lenny1 (using .../libkrb53_1.6.dfsg.4~beta1-5lenny2_amd64.deb) ... Unpacking replacement libkrb53 ... Setting up libkrb53 (1.6.dfsg.4~beta1-5lenny2) ... Traceback (most recent call last): File "/usr/bin/unattended-upgrade", line 262, in <module> stdin=subprocess.PIPE) File "/usr/lib/python2.5/subprocess.py", line 594, in __init__ errread, errwrite) File "/usr/lib/python2.5/subprocess.py", line 1149, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory These are due to this block of code in /usr/bin/unattended-upgrade: # check if we need to send a mail email = apt_pkg.Config.Find("Unattended-Upgrade::Mail", "") if email != "": logging.debug("Sending mail with '%s' to '%s'" % (logfile_dpkg, email)) mail = subprocess.Popen(["mail", "-s","unattended-upgrades result",email], stdin=subprocess.PIPE) s = "Unattended upgrade returned: %s\n\n" % (res != pm.ResultFailed) s += open(logfile_dpkg).read() mail.stdin.write(s) mail.stdin.close() ret = mail.wait() logging.debug("mail returned: %s" % ret) The errors occur because the mail command is not found. That's simply because no one asked for it. If to work properly, unattended-upgrades depends on mailutils, mailutils should be declared as a dependency, so that aptitude can resolve it properly. Mailutils is not part of the base system. It is involved as part of the libc6-udeb/libc6-udeb1 helper packages during the installation process, but does not necessarily end up being installed. So it is perfectly legitimate to run a system without mailutils, but with unattended-upgrades. A temporary solution is to manually check for the presence of the mailutils package, and adding it, if it is not installed. Please consider adding the dependency, or making the script fault tolerant and documenting the dependency. You could also split the mail feature into a separate notification package, so that the base package does not have a dependenc, but would simply check for the presence of a script provided by, say, "unattended-upgrades-notifier" (which would depend on mailutils), and invoke it, if present. Kind regards, Daniel -- System Information: Debian Release: 5.0.3 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages unattended-upgrades depends on: ii apt 0.7.20.2+lenny1 Advanced front-end for dpkg ii apt-utils 0.7.20.2+lenny1 APT utility programs ii python 2.5.2-3 An interactive high-level object-o ii python-apt 0.7.7.1+nmu1 Python interface to libapt-pkg unattended-upgrades recommends no packages. unattended-upgrades suggests no packages. -- no debconf information
--- End Message ---
--- Begin Message ---On Sun, Jan 17, 2010 at 02:25:27PM +0100, Daniel Alvarez Arribas wrote: > Package: unattended-upgrades > Version: 0.25.1debian1-0.1 > Severity: important Thanks for your bugreport. This bug is fixed with the current version of unattended-upgrades. It will not crash if mail is missing but instead give a proper message. Cheers, Michael > Unattended-upgrades seems to work fine, and packages get upgraded > automatically once they are available. > But everytime a package is actually upgraded, the corresponding dpkg-logfile > contains error messages, e.g.: > > (Reading database ... 19317 files and directories currently installed.) > Preparing to replace libkrb53 1.6.dfsg.4~beta1-5lenny1 (using > .../libkrb53_1.6.dfsg.4~beta1-5lenny2_amd64.deb) ... > Unpacking replacement libkrb53 ... > Setting up libkrb53 (1.6.dfsg.4~beta1-5lenny2) ... > Traceback (most recent call last): > File "/usr/bin/unattended-upgrade", line 262, in <module> > stdin=subprocess.PIPE) > File "/usr/lib/python2.5/subprocess.py", line 594, in __init__ > errread, errwrite) > File "/usr/lib/python2.5/subprocess.py", line 1149, in _execute_child > raise child_exception > OSError: [Errno 2] No such file or directory > > > These are due to this block of code in /usr/bin/unattended-upgrade: > > # check if we need to send a mail > email = apt_pkg.Config.Find("Unattended-Upgrade::Mail", "") > if email != "": > logging.debug("Sending mail with '%s' to '%s'" % (logfile_dpkg, > email)) > mail = subprocess.Popen(["mail", > "-s","unattended-upgrades result",email], > stdin=subprocess.PIPE) > s = "Unattended upgrade returned: %s\n\n" % (res != pm.ResultFailed) > s += open(logfile_dpkg).read() > mail.stdin.write(s) > mail.stdin.close() > ret = mail.wait() > logging.debug("mail returned: %s" % ret) > > > The errors occur because the mail command is not found. That's simply > because no one asked for it. > > If to work properly, unattended-upgrades depends on mailutils, mailutils > should be declared as a dependency, so that aptitude can resolve it properly. > Mailutils is not part of the base system. It is involved as part of the > libc6-udeb/libc6-udeb1 helper packages during the installation process, > but does not necessarily end up being installed. So it is perfectly > legitimate to run a system without mailutils, but with unattended-upgrades. > > A temporary solution is to manually check for the presence of the mailutils > package, and adding it, if it is not installed. > > Please consider adding the dependency, or making the script fault tolerant > and documenting the dependency. You could also split the mail feature into a > separate notification package, so that the base package does not have > a dependenc, but would simply check for the presence of a script provided by, > say, "unattended-upgrades-notifier" (which would depend on mailutils), > and invoke it, if present. > > > Kind regards, > > Daniel > > > -- System Information: > Debian Release: 5.0.3 > APT prefers stable > APT policy: (500, 'stable') > Architecture: amd64 (x86_64) > > Kernel: Linux 2.6.26-2-amd64 (SMP w/8 CPU cores) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) > Shell: /bin/sh linked to /bin/bash > > Versions of packages unattended-upgrades depends on: > ii apt 0.7.20.2+lenny1 Advanced front-end for dpkg > ii apt-utils 0.7.20.2+lenny1 APT utility programs > ii python 2.5.2-3 An interactive high-level > object-o > ii python-apt 0.7.7.1+nmu1 Python interface to libapt-pkg > > unattended-upgrades recommends no packages. > > unattended-upgrades suggests no packages. > > -- no debconf information > >
--- End Message ---

