@@ -40,6 +40,9 @@ def __init__(self, version):
4040# nothing else is listed.
4141PRIORITY_UPDATES = ['mintupdate' , 'mint-upgrade-info' ]
4242
43+ KERNEL_PKG_NAMES = ['linux-headers-VERSION' , 'linux-headers-VERSION-generic' , 'linux-image-VERSION-generic' , 'linux-modules-VERSION-generic' , 'linux-modules-extra-VERSION-generic' ]
44+ KERNEL_PKG_NAMES .append ('linux-image-extra-VERSION-generic' ) # Naming convention in 16.04, until 4.15 series
45+
4346class APTCheck ():
4447
4548 def __init__ (self ):
@@ -119,7 +122,7 @@ def find_changes(self):
119122 if 'linux-image-generic' in self .cache :
120123 recommended_kernel = KernelVersion (self .cache ['linux-image-generic' ].candidate .version )
121124 if (uname_kernel .numeric_representation <= recommended_kernel .numeric_representation ):
122- for pkgname in [ 'linux-headers-VERSION' , 'linux-headers-VERSION-generic' , 'linux-image-VERSION-generic' , 'linux-image-extra-VERSION-generic' ] :
125+ for pkgname in KERNEL_PKG_NAMES :
123126 pkgname = pkgname .replace ('VERSION' , recommended_kernel .std_version )
124127 if pkgname in self .cache :
125128 pkg = self .cache [pkgname ]
@@ -131,7 +134,7 @@ def find_changes(self):
131134 if 'linux-image-generic-hwe-16.04' in self .cache :
132135 recommended_kernel = KernelVersion (self .cache ['linux-image-generic-hwe-16.04' ].candidate .version )
133136 if (uname_kernel .numeric_representation <= recommended_kernel .numeric_representation ):
134- for pkgname in [ 'linux-headers-VERSION' , 'linux-headers-VERSION-generic' , 'linux-image-VERSION-generic' , 'linux-image-extra-VERSION-generic' ] :
137+ for pkgname in KERNEL_PKG_NAMES :
135138 pkgname = pkgname .replace ('VERSION' , recommended_kernel .std_version )
136139 if pkgname in self .cache :
137140 pkg = self .cache [pkgname ]
@@ -149,7 +152,7 @@ def find_changes(self):
149152 if kernel .numeric_representation > max_kernel .numeric_representation and kernel .series == max_kernel .series :
150153 max_kernel = kernel
151154 if max_kernel .numeric_representation != uname_kernel .numeric_representation :
152- for pkgname in [ 'linux-headers-VERSION' , 'linux-headers-VERSION-generic' , 'linux-image-VERSION-generic' , 'linux-image-extra-VERSION-generic' ] :
155+ for pkgname in KERNEL_PKG_NAMES :
153156 pkgname = pkgname .replace ('VERSION' , max_kernel .std_version )
154157 if pkgname in self .cache :
155158 pkg = self .cache [pkgname ]
0 commit comments