Marks unneeded packages as manually installed, if --dry-run is used

Bug #1544942 reported by Jarno Suni
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
Medium
Brian Murray
Xenial
Fix Released
Medium
Brian Murray

Bug Description

$ sudo unattended-upgrade --dry-run -d
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,a=wily-security']
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: []
whitelist: []
Option --dry-run given, *not* performing real actions
Packages that will be upgraded:
marking linux-headers-4.2.0-16-generic for remove
marking linux-headers-4.2.0-16 for remove
marking linux-image-4.2.0-16-generic for remove
marking linux-image-extra-4.2.0-16-generic for remove
Packages that are auto removed: 'linux-headers-4.2.0-16-generic linux-headers-4.2.0-16 linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic'
/usr/bin/dpkg --status-fd 9 --force-depends --force-remove-essential --remove linux-headers-4.2.0-16-generic:amd64 linux-headers-4.2.0-16:all linux-image-extra-4.2.0-16-generic:amd64 linux-image-4.2.0-16-generic:amd64
/usr/bin/dpkg --status-fd 11 --configure --pending
Packages were successfully auto-removed
InstCount=0 DelCount=4 BrokenCount=0

$ apt-mark showauto linux-headers-4.2.0-16-generic:amd64 linux-headers-4.2.0-16:all linux-image-extra-4.2.0-16-generic:amd64 linux-image-4.2.0-16-generic:amd64

$ sudo unattended-upgrade --dry-run -d
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,a=wily-security']
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: []
whitelist: []
No packages found that can be upgraded unattended and no pending auto-removals

Expect the packages to remain automatically installed after each `sudo unattended-upgrade --dry-run -d`.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: unattended-upgrades 0.86.2ubuntu1.1
ProcVersionSignature: Ubuntu 4.2.0-27.32-generic 4.2.8-ckt1
Uname: Linux 4.2.0-27-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Feb 12 13:58:29 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-01-24 (18 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
PackageArchitecture: all
SourcePackage: unattended-upgrades
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.apt.apt.conf.d.50unattended.upgrades: 2016-02-12T13:53:13.426454

Revision history for this message
Jarno Suni (jarnos) wrote :
Jarno Suni (jarnos)
summary: - removes unneeded packages even if --dry-run is used
+ Marks unneeded packages as manually installed, if --dry-run is used
Jarno Suni (jarnos)
description: updated
Jarno Suni (jarnos)
tags: added: precise trusty xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unattended-upgrades (Ubuntu):
status: New → Confirmed
Changed in unattended-upgrades (Ubuntu):
importance: Undecided → High
Mathew Hodson (mhodson)
Changed in unattended-upgrades (Ubuntu):
importance: High → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

Another example:

Option --dry-run given, *not* performing real actions
Packages that will be upgraded:
marking linux-image-extra-3.13.0-57-generic for remove
marking linux-image-3.13.0-57-generic for remove
marking linux-headers-3.13.0-57-generic for remove
marking linux-headers-3.13.0-57 for remove
Packages that are auto removed: 'linux-headers-3.13.0-57 linux-headers-3.13.0-57-generic linux-image-3.13.0-57-generic linux-image-extra-3.13.0-57-generic'
/usr/bin/dpkg --status-fd 9 --force-depends --force-remove-essential --remove linux-headers-3.13.0-57-generic:amd64 linux-headers-3.13.0-57:all linux-image-extra-3.13.0-57-generic:amd64 linux-image-3.13.0-57-generic:amd64
/usr/bin/dpkg --status-fd 11 --configure --pending
Packages were successfully auto-removed
InstCount=0 DelCount=4 BrokenCount=0

tags: added: rls-z-incoming
Changed in unattended-upgrades (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.93.1ubuntu1

---------------
unattended-upgrades (0.93.1ubuntu1) zesty; urgency=medium

  [ Brian Murray ]
  * When performing a sanity check for packages to install or upgrade return
    false when either there are no packages in the cache or the package to
    upgrade is not in the change set. (LP: #1654070)
  * Do not mark packages for deletion / autoremoval if unattended-upgrades is
    being run in dry-run mode. (LP: #1544942)

  [ Louis Bouchard ]
  * Store delay command line option as an int not a string since we do maths
    with it.

 -- Brian Murray <email address hidden> Fri, 06 Jan 2017 13:00:24 -0800

Changed in unattended-upgrades (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Jarno Suni (jarnos) wrote :

How about SRU?

tags: added: full-boot
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this fix to the SRU queue for Xenial.

Changed in unattended-upgrades (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Jarno, or anyone else affected,

Accepted unattended-upgrades into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unattended-upgrades/0.90ubuntu0.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unattended-upgrades (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Jarno Suni (jarnos) wrote :

Tried version 0.90ubuntu0.8 and it worked ok.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.90ubuntu0.8

---------------
unattended-upgrades (0.90ubuntu0.8) xenial; urgency=medium

  * Do not mark packages for deletion / autoremoval if unattended-upgrades is
    being run in dry-run mode. (LP: #1544942)

 -- Brian Murray <email address hidden> Mon, 18 Sep 2017 13:36:57 -0700

Changed in unattended-upgrades (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for unattended-upgrades has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Mathew Hodson (mhodson)
tags: removed: rls-z-incoming verification-needed wily
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.