Comment 3 for bug 1514057

Revision history for this message
ash (sersorrel) wrote :

I believe this is due to a simplistic handling of "freeness" in UbuntuDrivers.detect._is_package_free() – any package not from restricted or multiverse is considered free:

    # it would be better to check the actual license, as we do not have
    # the component for third-party packages; but this is the best we can do
    # at the moment
    if pkg.candidate.section.startswith('restricted') or \
            pkg.candidate.section.startswith('multiverse'):
        return False
    return True

Possibly it would be better to do the logic the other way around ("if it's in main/universe/whatever, then it's free, otherwise it's nonfree"), but really a better solution is needed.

However, I notice that the Nvidia drivers on my system are from section "non-free/libs" – the following patch fixes the problem for me:

--- a/UbuntuDrivers/detect.py 2019-01-10 02:30:54.326668673 +0000
+++ b/UbuntuDrivers/detect.py 2019-01-10 02:36:24.707733516 +0000
@@ -165,7 +165,8 @@
     # the component for third-party packages; but this is the best we can do
     # at the moment
     if pkg.candidate.section.startswith('restricted') or \
- pkg.candidate.section.startswith('multiverse'):
+ pkg.candidate.section.startswith('multiverse') or \
+ pkg.candidate.section.startswith('non-free'):
         return False
     return True