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 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org