~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/sourcepackage.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-03 05:05:39 UTC
  • mfrom: (14514.3.5 new-python-apt)
  • Revision ID: launchpad@pqm.canonical.com-20120103050539-y6ipuo5e9illcrsr
[r=benji][bug=551510] Port to new python-apt API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import urllib
23
23
 
24
24
from apt_pkg import (
25
 
    ParseSrcDepends,
 
25
    parse_src_depends,
26
26
    upstream_version,
27
 
    VersionCompare,
 
27
    version_compare,
28
28
    )
29
29
from lazr.enum import (
30
30
    EnumeratedType,
510
510
    def _relationship_parser(self, content):
511
511
        """Wrap the relationship_builder for SourcePackages.
512
512
 
513
 
        Define apt_pkg.ParseSrcDep as a relationship 'parser' and
 
513
        Define apt_pkg.parse_src_depends as a relationship 'parser' and
514
514
        IDistroSeries.getBinaryPackage as 'getter'.
515
515
        """
516
516
        getter = self.context.distroseries.getBinaryPackage
517
 
        parser = ParseSrcDepends
 
517
        parser = parse_src_depends
518
518
        return relationship_builder(content, parser=parser, getter=getter)
519
519
 
520
520
    @property
678
678
        # Compare the base version contained in the full debian version
679
679
        # to upstream release's version.
680
680
        base_version = upstream_version(current_release.version)
681
 
        age = VersionCompare(upstream_release.version, base_version)
 
681
        age = version_compare(upstream_release.version, base_version)
682
682
        if age > 0:
683
683
            return PackageUpstreamTracking.NEWER
684
684
        elif age < 0: