~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/scripts/packagecopier.py

  • Committer: Curtis Hovey
  • Date: 2011-12-18 15:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 14547.
  • Revision ID: curtis.hovey@canonical.com-20111218151307-sdm2gzobt5tplbe0
Moved badges to lp.app.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from lazr.delegates import delegates
25
25
from zope.component import getUtility
26
26
 
 
27
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
 
28
from canonical.librarian.utils import copy_and_close
27
29
from lp.app.errors import NotFoundError
28
30
from lp.buildmaster.enums import BuildStatus
29
 
from lp.services.librarian.interfaces import ILibraryFileAliasSet
30
 
from lp.services.librarian.utils import copy_and_close
31
31
from lp.soyuz.adapters.notification import notify
32
32
from lp.soyuz.adapters.packagelocation import build_package_location
33
33
from lp.soyuz.enums import (
504
504
        if ancestry is not None:
505
505
            ancestry_version = ancestry.sourcepackagerelease.version
506
506
            copy_version = source.sourcepackagerelease.version
507
 
            apt_pkg.init_system()
508
 
            if apt_pkg.version_compare(copy_version, ancestry_version) < 0:
 
507
            apt_pkg.InitSystem()
 
508
            if apt_pkg.VersionCompare(copy_version, ancestry_version) < 0:
509
509
                raise CannotCopy(
510
510
                    "version older than the %s published in %s" %
511
511
                    (ancestry.displayname, ancestry.distroseries.name))