group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #30059
[Bug 1795696] Re: /usr/bin/unattended-upgrade:UnboundLocalError:/usr/bin/unattended-upgrade@1991:main:do_auto_remove
This bug was fixed in the package unattended-upgrades -
1.1ubuntu1.18.04.7~16.04.3
---------------
unattended-upgrades (1.1ubuntu1.18.04.7~16.04.3) xenial; urgency=medium
* Detect changes to moved conffiles (LP: #1823872)
- Add tests for checking conffile moves.
Build depend on and use equivs to generate new test packages
- Split() conffile data to set of names only once
- Don't parse dpkg conffile db when there are no conffiles in the package
* Detect unchanged moved conffiles.
When a package moves a conffile properly without any change no conffile
prompt needs to be shown thus the package can be upgraded unattended.
(LP: #1823872)
* Skip sending email when no package had to be installed, upgraded or removed
(LP: #1821103) (Closes: #924554)
* Make sure autoremovals don't start with a dirty cache and remove other
packages (LP: #1824341)
* Continue applying minimal sets when one set can't be marked for upgrade.
Thanks to Anderson Luiz Alves for the patch, it needed minor modifications
(LP: #1824341)
* Stop raising NoAllowedOriginError when marking packages to upgrade/install
fails (LP: #1824876)
* Adjust only transitive dependencies in the fallback when a package from an
allowed origin can't be marked to install/upgrade.
This is a much lighter approach than marking every upgradable package
because the full fallback was triggered on packages held back as well,
using an excessive amount of CPU time.
Also it crashed with packages not having any version in allowed origins.
(LP: #1824804, #1824949)
* Skip trying to upgrade held packages in call_adjusted() (LP: #1824804)
* Follow all kinds of transitive dependencies when adjusting dependencies
* Don't crash collecting transitive dependencies when package has no candidate
(LP: #1825886)
* Use mark_install_adjusted() in rewind_cache()
The original cache had packages marked with adjustments thus rewinding
should also do adjustments to reach the same state.
Also not using mark_install_adjusted() crashes when apt raises error on
held packages. (LP: #1826157)
- test_rewind: Update test to check if adjustend rewinding took place
* do_auto_remove() is successful unless a commit() operation fails
(LP: #1795696)
* Compare apt.package.Version objects and not the versions' string
representation. (LP: #1820888)
This prevented adjusting candidates when the strings sorted differently.
Also extend tests to catch issue.
* Fall back to adjusting more packages' candidates
when a package from an allowed origin can't be marked to install/upgrade.
(LP: #1821101)
-- Balint Reczey <rbalint@xxxxxxxxxx> Mon, 29 Apr 2019 12:23:14 +0200
** Changed in: unattended-upgrades (Ubuntu Xenial)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1795696
Title:
/usr/bin/unattended-upgrade:UnboundLocalError:/usr/bin/unattended-
upgrade@1991:main:do_auto_remove
Status in unattended-upgrades package in Ubuntu:
Fix Released
Status in unattended-upgrades source package in Xenial:
Fix Released
Status in unattended-upgrades source package in Bionic:
Fix Released
Status in unattended-upgrades source package in Cosmic:
Fix Released
Bug description:
[Impact]
* Unattended-upgrades crashes while auto-removing kernel packages.
[Test Case]
1. Install kernel packages to be automatically removed:
# eatmydata apt install linux-image-4.18.0-13-generic linux-image-4.18.0-14-generic linux-image-4.18.0-15-generic
# apt-mark auto linux-image-4.18.0-13-generic linux-image-4.18.0-14-generic linux-image-4.18.0-15-generic
# /etc/kernel/postinst.d/apt-auto-removal
2. Set up u-u to perform action in non-minimal steps:
# grep Minimal /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::MinimalSteps "false";
3. Run u-u in dry-run mode.
Observe it failing with not fixed versions:
# unattended-upgrade --dry-run
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 1998, in <module>
sys.exit(main(options))
File "/usr/bin/unattended-upgrade", line 1798, in main
options.verbose or options.debug, options.dry_run)
File "/usr/bin/unattended-upgrade", line 1495, in do_auto_remove
if res:
UnboundLocalError: local variable 'res' referenced before assignment
Observe the fixed version running properly:
# ./unattended-upgrade --dry-run
#
[Regression Potential]
* The fix is very small and isolated, but a programming error could
cause the misreporting of the success of auto-removals. Considering
the size and simplicity of the change, regressions here seem unlikely.
[Original Bug Text]
The Ubuntu Error Tracker has been receiving reports about a problem regarding unattended-upgrades. This problem was most recently seen with package version 1.1ubuntu1.18.04.5, the problem page at https://errors.ubuntu.com/problem/651a7b7a070dd794d8cf2f5ea8e974614fdedb8e contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1795696/+subscriptions