~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to UpdateManager/Core/MyCache.py

  • Committer: Michael Vogt
  • Date: 2009-02-16 12:09:28 UTC
  • Revision ID: michael.vogt@ubuntu.com-20090216120928-xrcylim4xrcvo8bq
make backports lower priority than distro updates, ensure that the autoamtic dependency is higher version than the regular one

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        """
97
97
        check if 'pkg' is upgradable but has the 'NotAutomatic' flag
98
98
        """
99
 
        if (pkg.isInstalled and
100
 
            not pkg.isUpgradable and
101
 
            pkg.candidateOrigin and
102
 
            self._has_ver_with_not_automatic_origin(pkg)):
103
 
            # FIXME: check version is actuall higher
104
 
            return True
 
99
        if ( pkg.isInstalled and
 
100
             not pkg.isUpgradable and
 
101
             pkg.candidateOrigin and
 
102
             self._has_ver_with_not_automatic_origin(pkg)
 
103
            ):
 
104
            # now check if there is a higher NotAutomatic version
 
105
            candVer = pkg._depcache.GetCandidateVer(pkg._pkg)
 
106
            for ver in pkg._pkg.VersionList:
 
107
                if apt_pkg.VersionCompare(ver.VerStr, candVer.VerStr) > 0:
 
108
                    return True
105
109
        return False
106
110
    def markUpgradeInstall(self, pkg):
107
111
        """