Bug#517510: unattended-upgrades: global name 'cache' is not defined
On Sat, Feb 28, 2009 at 11:30:28AM +0100, Andreas Feldner wrote: Package: unattended-upgrades Version: 0.37debian1 Severity: important The following error report is mailed by Anacron: /etc/cron.daily/apt: Traceback (most recent call last): File /usr/bin/unattended-upgrade, line 374, in module main() File /usr/bin/unattended-upgrade, line 200, in main rewind_cache(pkgs_to_upgrade) File /usr/bin/unattended-upgrade, line 112, in rewind_cache cache.clear() NameError: global name 'cache' is not defined Thanks, I fixed that in my bzr tree and it will be part of the next upload. I also attach the fix to this mail. Cheers, Michael === modified file 'unattended-upgrade' --- unattended-upgrade 2008-12-09 17:59:20 + +++ unattended-upgrade 2009-03-02 09:33:52 + @@ -107,7 +107,7 @@ return False return True -def rewind_cache(pkgs_to_upgrade): +def rewind_cache(cache, pkgs_to_upgrade): set the cache back to the state with packages_to_upgrade cache.clear() for pkg2 in pkgs_to_upgrade: @@ -197,12 +197,12 @@ pkgs_to_upgrade.append(pkg) else: logging.debug(sanity check failed) -rewind_cache(pkgs_to_upgrade) +rewind_cache(cache, pkgs_to_upgrade) pkgs_kept_back.append(pkg) except SystemError, e: # can't upgrade logging.warning(_(package '%s' upgradable but fails to be marked for upgrade (%s)) % e) -rewind_cache(pkgs_to_ugprade) +rewind_cache(cache, pkgs_to_ugprade) pkgs_kept_back.append(pkg)
Bug#517510: unattended-upgrades: global name 'cache' is not defined
Package: unattended-upgrades Version: 0.37debian1 Severity: important The following error report is mailed by Anacron: /etc/cron.daily/apt: Traceback (most recent call last): File /usr/bin/unattended-upgrade, line 374, in module main() File /usr/bin/unattended-upgrade, line 200, in main rewind_cache(pkgs_to_upgrade) File /usr/bin/unattended-upgrade, line 112, in rewind_cache cache.clear() NameError: global name 'cache' is not defined -- System Information: Debian Release: 5.0 APT prefers testing APT policy: (990, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.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 Advanced front-end for dpkg ii apt-utils 0.7.20.2 APT utility programs ii python2.5.2-3An interactive high-level object-o ii python-apt0.7.8 Python interface to libapt-pkg ii ucf 3.0016 Update Configuration File: preserv unattended-upgrades recommends no packages. Versions of packages unattended-upgrades suggests: ii bsd-mailx [mailx] 8.1.2-0.20081101cvs-2 A simple mail user agent -- debconf information: * unattended-upgrades/enable_auto_updates: true -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org