~mterry/software-center/network-manager-0.9

« back to all changes in this revision

Viewing changes to softwarecenter/db/pkginfo.py

  • Committer: Michael Vogt
  • Date: 2011-06-01 07:27:36 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110601072736-jd4bp3upu4qujpsl
make the version_compare stuff distro specific

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    def __contains__(self, pkgname):
71
71
        return False
72
72
 
 
73
    @staticmethod
 
74
    def version_compare(v1, v2):
 
75
        """ compare two versions """
 
76
        return cmp(v1, v2)
 
77
    @staticmethod
 
78
    def upstream_version_compare(v1, v2):
 
79
        """ compare two versions, but ignore the distro specific revisions """
 
80
        return cmp(v1, v2)
 
81
    @staticmethod
 
82
    def upstream_version(v):
 
83
        """ Return the "upstream" version number of the given version """
 
84
        return v
 
85
 
73
86
    def is_installed(self, pkgname):
74
87
        pass
75
88
    def is_available(self, pkgname):