Skip to content

Commit 278f561

Browse files
committed
Don't show the source package for linux-libc-dev when it's
installed on its own. This package is included with build-essential, which is needed to update kernel modules. Unfortunately it's part of the LTS 'linux' package, and currently shows up in mintupdate as a kernel 6.8 update, confusing users that only have 6.14 installed.
1 parent d1f599f commit 278f561

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

usr/lib/linuxmint/mintUpdate/Classes.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# These updates take priority over other updates.
2020
# If a new version of these packages is available, nothing else is listed.
2121
PRIORITY_UPDATES = ['mintupdate', 'mint-upgrade-info']
22+
# These updates, if appearing alone, should use their binary package names to avoid confusion.
23+
SOURCE_PACKAGE_NAME_OVERRIDES = ["linux-libc-dev"]
2224

2325
settings = Gio.Settings(schema_id="com.linuxmint.updates")
2426

@@ -116,7 +118,12 @@ def __init__(self, package=None, source_name=None):
116118
self.source_name = source_name
117119
else:
118120
self.source_name = self.real_source_name
119-
self.display_name = self.source_name
121+
122+
if self.main_package_name in SOURCE_PACKAGE_NAME_OVERRIDES:
123+
self.display_name = self.package_name
124+
else:
125+
self.display_name = self.source_name
126+
120127
self.short_description = package.candidate.raw_description
121128
self.description = package.candidate.description
122129
self.archive = ""
@@ -150,6 +157,9 @@ def __init__(self, package=None, source_name=None):
150157
self.type = "kernel"
151158

152159
def add_package(self, pkg):
160+
if self.main_package_name in SOURCE_PACKAGE_NAME_OVERRIDES:
161+
self.display_name = self.source_name
162+
153163
self.package_names.append(pkg.name)
154164
self.source_packages.add("%s=%s" % (pkg.candidate.source_name, pkg.candidate.source_version))
155165
self.size += pkg.candidate.size

0 commit comments

Comments
 (0)