apt-dater-host doesn't correctly recognize available kernels -> please update to current upstream apt-dater-host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt-dater-host (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
$ ssh ubuntu_
# dpkg -s apt-dater-host | grep Version
Version: 1.0.1-1
# apt-dater-host kernel
ADPROTO: 0.7
KERNELINFO: 1 4.13.0-36-generic
# zgrep KERNELINFO -m 1 -A 4 -B 2 /usr/share/
The result line has the following format:
KERNELINFO: ${Code} ${Release}
The following codes are supported:
0 - The running kernel is the latest distri kernel. No reboot required.
1 - The running kernel is an distri kernel but it's older then the latest
So apt-dater-host is telling us, that a new kernel is available on this
machine. Let's see:
# uname -r
4.13.
# dpkg-query -W -f='\${Package} \${Version} \${Status;20} \${Maintainer} \${Provides}\n' 'linux-image*'
$linux-image $ $unknown ok not-insta $ $
$linux-
$linux-
$linux-
$linux-
$linux-
$linux-
$linux-
So, no, in fact, there is no newer kernel image available. We do have
the latest kernel installed.
Now if we go and debug apt-dater-host, we find out, that the above
command (modulo the '\${Package}' name) is exactly what apt-dater-host
is, to retrieve the list of available kernel images.
Now why does apt-dater-host go wrong in determining whether there's a
new kernel?
It is because it iterates over that list [1] and compares the version
from `uname -r` with the version from the list. The problem here is,
that comparing the current installed kernel version with the version
from the the last line, i.e. :
# dpkg --compare-versions 4.13.0-36 lt 4.13.0.36.55
will yield
# echo $?
0
meaning, yes there indeed *is* a newer kernel available. The problem is
only, that linux-image-
instead is a kernel *meta* package, that depends on the latest kernel...
Current apt-dater-host versions from upsteam improve the query [2] with a:
| grep linux-image
Remember, the upstream query does not include the '\${Package}' field,
so what the grep does is to effectively filter out by the '\${Provides}'
field, which in the case of the meta package is empty. Only the "real"
kernel packages do provide a 'linux-image'.
Thus upstream's apt-dater-host works on Ubuntu, while Debian's
apt-dater-host doesn't.
If you update Debian's apt-dater-host then I think it will be pulled
into Ubuntu, and things should be fixed there. So I ask you to please
update the Debian apt-dater-host from upstream.
This is the same bug as https:/
Thanks.
*t
[1] https:/
[2] https:/