[Bug 1175637] Re: Kernel updates are being marked as manually installed
Daniel Hartwig
mandyke at gmail.com
Thu Jun 6 03:14:36 UTC 2013
unattended-upgrade does not directly handle dependencies, and its only
effective calls are to ‘mark_upgrade’.
> 08:36 < slangasek> ah, there's a single call to
> mark_install() in u-a, so that would
> be nice and convenient if so
In ‘upgrade_in_minimal_steps’, but conditional on:
elif not pkg.is_installed:
pkg.mark_install()
so only called if somehow a not-installed package ends up in
pkgs_to_upgrade inside main. There are many unconditional calls to
pkg.mark_upgrade that should generate a python-apt error for a
not-installed package in that list.
In any case, looking at the log Brian provided,
linux-image-3.2.0-44-generic is the package of interest, yet does not
appear in pkgs_to_upgrade (see the second to last line of the log,
starting “Packages that are upgraded:”).
> 08:35 < cjwatson> mark_install(from_user=False) I think?
> But check ...
This is a too common misconception. ‘FromUser’ is concerned with other
functions, such as whether to override a hold or not. It must never
be used strictly for the side-effect of maybe setting auto-installed.
The only proper way to explicitly mark a package auto-installed is to
call ‘MarkInstall’ followed by ‘MarkAuto’, and most programs need not
be concerned with that unless e.g. they include their own dependency
solver.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1175637
Title:
Kernel updates are being marked as manually installed
Status in “apt” package in Ubuntu:
Confirmed
Status in “unattended-upgrades” package in Ubuntu:
Confirmed
Bug description:
Updates to the linux-image-* packages in Precise are being marked as
"manually" installed, regardless of the auto/manual flag on the
existing kernel packages. This happens when updating packages with
apt, aptitude, or unattended-upgrades. I'm running an up-to-date
12.04.2 LTS installed (amd64).
I can see that my existing kernels were marked as automatically
installed:
% apt-mark showauto | grep linux-image
linux-image-3.2.0-40-generic
linux-image-generic
And, after the update was performed by unattended-upgrades last night,
the new kernel is marked manual:
% apt-mark showmanual | grep linux-image
linux-image-3.2.0-41-generic
This is a problem, because it renders the fix in this bug,
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/923876 (Limit and
clean-up kernel images and headers automatically in LTS) ineffective,
since apt-get autoremove will not remove packages which are marked as
manually installed.
I'm running the following package versions:
apt: 0.8.16~exp12ubuntu10.10
aptitude: 0.8.16~exp12ubuntu10.10
unattended-upgrades: 0.8.16~exp12ubuntu10.10
aptdaemon: 0.43+bzr805-0ubuntu9
This bug looks similar to
https://bugs.launchpad.net/aptdaemon/+bug/1078544, however, I'm
running a version of aptdaemon that supposedly has this fix applied.
Please let me know if I can provide any other useful information.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1175637/+subscriptions
More information about the foundations-bugs
mailing list