Comment 92 for bug 1988836

Revision history for this message
jeremyszu (os369510) wrote :

I believe the fix for u-d-c is landed in jammy-updates for a long?

commit b44aeb56032d14aef4a46dab5411875ca8868e3f
Author: Alberto Milone <email address hidden>
Date: Tue Aug 2 16:16:50 2022 +0200

    UbuntuDrivers/detect.py: make sure -open drivers have a lower priority

diff --git a/UbuntuDrivers/detect.py b/UbuntuDrivers/detect.py
index 25d32ee..439e97f 100644
--- a/UbuntuDrivers/detect.py
+++ b/UbuntuDrivers/detect.py
@@ -1096,10 +1096,17 @@ def _pkg_support_from_cache(x):
 def _cmp_gfx_alternatives(x, y):
     '''Compare two graphics driver names in terms of preference. (desktop)

+ -open always sorts after non-open.
     -server always sorts after non-server.
     LTSB (Long Term Support Branch) always sorts before NFB (New Feature Branch).
     Legacy always sorts before Beta.
     '''
+
+ if x.endswith('-open') and not y.endswith('-open'):
+ return -1
+ if not x.endswith('-open') and y.endswith('-open'):
+ return 1
+
     if x.endswith('-server') and not y.endswith('-server'):
         return -1
     if not x.endswith('-server') and y.endswith('-server'):