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.
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, 3.2.0-44- generic is the package of interest, yet does not
linux-image-
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.