Thanks - I'm taking a look at this.

For context, we removed this from Questing since we could not find any
references to it in software-properties-common or subiquity, and since
it appears to have not been updated since 2020 (and thus we believe it
was subsumed by equivalent functionality in other parts of the ubuntu-
drivers application, since it seems to be an outdated version of
UbuntuDrivers/detect.py and ./ubuntu-drivers).

It looks like there is still a lingering usage of it in here, though, in
DistUpgrade/DistUpgradeCache.py:

```
    def checkForNvidia(self):
        """
        this checks for nvidia hardware and checks what driver is needed
        """
        logging.debug("nvidiaUpdate()")
        # if the free drivers would give us a equally hard time, we would
        # never be able to release
        try:
            from NvidiaDetector.nvidiadetector import NvidiaDetection
        except (ImportError, SyntaxError) as e:
            # SyntaxError is temporary until the port of NvidiaDetector to
            # Python 3 is in the archive.
            logging.error("NvidiaDetector can not be imported %s" % e)
            return False
        try:
            # get new detection module and use the modalises files
            # from within the release-upgrader
            nv = NvidiaDetection(obsolete="./ubuntu-drivers-obsolete.pkgs")
            #nv = NvidiaDetection()
            # check if a binary driver is installed now
            for oldDriver in nv.oldPackages:
                if oldDriver in self and self[oldDriver].is_installed:
                    self.mark_remove(oldDriver, "old nvidia driver")
                    break
            else:
                logging.info("no old nvidia driver installed, installing no 
new")
                return False
            # check which one to use
            driver = nv.selectDriver()
            logging.debug("nv.selectDriver() returned '%s'" % driver)
            if not driver in self:
                logging.warning("no '%s' found" % driver)
                return False
            if not (self[driver].marked_install or self[driver].marked_upgrade):
                self[driver].mark_install()
                logging.info("installing %s as suggested by NvidiaDetector" % 
driver)
        except Exception as e:
            logging.error("NvidiaDetection returned a error: %s" % e)
        return False
```

I'm taking a look to see whether this is something already modernized by
another part of the u-d-c source. If so, we'll update the u-r-u
package's invocation here - if not, we can revert the Questing version
of u-d-c to add the NvidiaDector back in.

stay tuned.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2126679

Title:
  FTBFS due to removal of nvidiadetection from ubuntu-drivers-common

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2126679/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to