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