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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1175637

Title:
  Kernel updates are being marked as manually installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1175637/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to