Public bug reported:

    $ ssh ubuntu_xenial_machine
    # 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/doc/apt-dater-host/ADP-0.7.gz 
    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.0-36-generic
    
    # dpkg-query -W -f='\${Package} \${Version} \${Status;20} \${Maintainer} 
\${Provides}\n' 'linux-image*'
    $linux-image $ $unknown ok not-insta $ $
    $linux-image-4.13.0-31-generic $4.13.0-31.34~16.04.1 $deinstall ok config- 
$Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $aufs-dkms, fuse-module, 
ivtv-modules, kvm-api-4, linux-image, redhat-cluster-modules, spl-dkms, 
spl-modules, virtualbox-guest-modules, zfs-dkms, zfs-modules
    $linux-image-4.13.0-32-generic $4.13.0-32.35~16.04.1 $install ok installed 
$Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $aufs-dkms, fuse-module, 
ivtv-modules, kvm-api-4, linux-image, redhat-cluster-modules, spl-dkms, 
spl-modules, virtualbox-guest-modules, zfs-dkms, zfs-modules
    $linux-image-4.13.0-36-generic $4.13.0-36.40~16.04.1 $install ok installed 
$Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $aufs-dkms, fuse-module, 
ivtv-modules, kvm-api-4, linux-image, redhat-cluster-modules, spl-dkms, 
spl-modules, virtualbox-guest-modules, zfs-dkms, zfs-modules
    $linux-image-extra-4.13.0-31-generic $4.13.0-31.34~16.04.1 $deinstall ok 
config- $Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $
    $linux-image-extra-4.13.0-32-generic $4.13.0-32.35~16.04.1 $install ok 
installed $Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $
    $linux-image-extra-4.13.0-36-generic $4.13.0-36.40~16.04.1 $install ok 
installed $Ubuntu Kernel Team <kernel-t...@lists.ubuntu.com> $
    $linux-image-generic-hwe-16.04 $4.13.0.36.55 $install ok installed $Ubuntu 
Kernel Team <kernel-t...@lists.ubuntu.com> $

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-generic-hwe-16.04 is *not* a kernel package, but
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://bugs.debian.org/891092 which was closed
there because among other reasons "this is the wrong platform for Ubuntu
bugs I am closing it here."

Thanks.
*t

[1] 
https://github.com/DE-IBH/apt-dater-host/blob/master/dpkg/apt-dater-host#L383
[2] 
https://github.com/DE-IBH/apt-dater-host/blob/master/dpkg/apt-dater-host#L379

** Affects: apt-dater-host (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1751047

Title:
  apt-dater-host doesn't correctly recognize available kernels -> please
  update to current upstream apt-dater-host

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

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

Reply via email to