Package: unattended-upgrades Version: 0.83.3 Severity: minor Tags: patch Dear Maintainer,
Due to truncating of time values less than a second, the dpkg log is sometimes not found; and "if stanza_start >= install_start_time:" doens't work as expected. It is easy to fix, the line "install_start_time = datetime.datetime.now()" just needs to be moved up to the start of main() https://github.com/a-detiste/unattended- upgrades/commit/83f9d2b76428a4cad6f72d91b08a93a17d8d8c3b Alexandre Detiste -- System Information: Debian Release: 8.0 APT prefers testing APT policy: (501, 'testing'), (450, 'unstable'), (400, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.18.0-trunk-amd64 (SMP w/6 CPU cores) Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages unattended-upgrades depends on: ii apt 1.0.9.6 ii apt-utils 1.0.9.6 ii debconf [debconf-2.0] 1.5.55 ii init-system-helpers 1.22 ii lsb-base 4.1+Debian13+nmu1 ii lsb-release 4.1+Debian13+nmu1 ii python3 3.4.2-2 ii python3-apt 0.9.3.11 ii ucf 3.0030 ii xz-utils 5.1.1alpha+20120614-2+b3 unattended-upgrades recommends no packages. Versions of packages unattended-upgrades suggests: pn bsd-mailx <none> ii nullmailer [mail-transport-agent] 1:1.13-1 -- debconf information: * unattended-upgrades/enable_auto_updates: true -- debsums errors found: debsums: changed file /usr/bin/unattended-upgrade (from unattended-upgrades package)
>From 83f9d2b76428a4cad6f72d91b08a93a17d8d8c3b Mon Sep 17 00:00:00 2001 From: Alexandre Detiste <[email protected]> Date: Sun, 1 Feb 2015 11:36:04 +0100 Subject: [PATCH] fix sending dpkg log in mails due to some rounding of time values less than a second, the dpkg log is not found --- unattended-upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended-upgrade b/unattended-upgrade index 0205897..39ea8d0 100755 --- a/unattended-upgrade +++ b/unattended-upgrade @@ -1028,6 +1028,7 @@ def get_dpkg_log_content(logfile_dpkg, install_start_time): def main(options, rootdir=""): + install_start_time = datetime.datetime.now() # useful for testing if rootdir: @@ -1252,7 +1253,6 @@ def main(options, rootdir=""): # only perform install step if we actually have packages to install pkg_install_success = None shutdown_lock = -1 - install_start_time = datetime.datetime.now() if len(pkgs_to_upgrade) > 0: # lock for the shutdown check - its fine if the system # is shutdown while downloading but not so much while installing -- 2.1.4

