Comment 10 for bug 1874250

Revision history for this message
Jaroslaw Smorczewski (smoczyna) wrote :

This bug affects all ubuntu version since I think 18.04
The problem is that upgrader tries to use UbuntuDistroInfo object (child of DistroInfo) in unsupported way. I believe it is upgrader issue.
At least one class of the upgrader, namely: DistUpgradeQuirks tries to call version field and get_all method of DistroInfo object and there are neither of them there.

The reason I think it's upgrader issue is this code I found in above class, this is the source of te installer failure.

def _get_from_and_to_version(self):
        di = distro_info.UbuntuDistroInfo()
        try:
            self._from_version = \
                di.version('%s' % self.controller.fromDist).split()[0]
            self._to_version = \
                di.version('%s' % self.controller.toDist).split()[0]
        # Ubuntu 18.04's python3-distro-info does not have version
        except AttributeError:
            self._from_version = next(
                (r.version for r in di.get_all("object")
                 if r.series == self.controller.fromDist),
                self.controller.fromDist).split()[0]
            self._to_version = next(
                (r.version for r in di.get_all("object")
                 if r.series == self.controller.toDist),
                self.controller.toDist).split()[0]