mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-11 00:41:28 +00:00
move copyPackage into lpapicache for better encapsulation
This commit is contained in:
parent
ecaaa33fdc
commit
f8d4866cbc
@ -340,7 +340,7 @@ def copy(src_pkg, debian_version, release, simulate=False):
|
|||||||
ubuntu_archive.copyPackage(
|
ubuntu_archive.copyPackage(
|
||||||
source_name=src_pkg,
|
source_name=src_pkg,
|
||||||
version=debian_version,
|
version=debian_version,
|
||||||
from_archive=debian_archive.lp_object(),
|
from_archive=debian_archive,
|
||||||
to_series=ubuntu_series,
|
to_series=ubuntu_series,
|
||||||
to_pocket=ubuntu_pocket,
|
to_pocket=ubuntu_pocket,
|
||||||
include_binaries=False)
|
include_binaries=False)
|
||||||
|
@ -172,9 +172,6 @@ class BaseWrapper(object):
|
|||||||
else:
|
else:
|
||||||
return '<%s: %r>' % (self.__class__.__name__, self._lpobject)
|
return '<%s: %r>' % (self.__class__.__name__, self._lpobject)
|
||||||
|
|
||||||
def lp_object(self):
|
|
||||||
return self._lpobject
|
|
||||||
|
|
||||||
|
|
||||||
class Distribution(BaseWrapper):
|
class Distribution(BaseWrapper):
|
||||||
'''
|
'''
|
||||||
@ -335,6 +332,25 @@ class Archive(BaseWrapper):
|
|||||||
|
|
||||||
return self._srcpkgs[(name, series.name, pocket)]
|
return self._srcpkgs[(name, series.name, pocket)]
|
||||||
|
|
||||||
|
def copyPackage(self, source_name, version, from_archive, to_pocket,
|
||||||
|
to_series = None, include_binaries = False):
|
||||||
|
'''Copy a single named source into this archive.
|
||||||
|
|
||||||
|
Asynchronously copy a specific version of a named source to the
|
||||||
|
destination archive if necessary. Calls to this method will return
|
||||||
|
immediately if the copy passes basic security checks and the copy
|
||||||
|
will happen sometime later with full checking.
|
||||||
|
'''
|
||||||
|
|
||||||
|
self._lpobject.copyPackage(
|
||||||
|
source_name=source_name,
|
||||||
|
version=version,
|
||||||
|
from_archive=from_archive._lpobject,
|
||||||
|
to_pocket=to_pocket,
|
||||||
|
to_series=to_series,
|
||||||
|
include_binaries=include_binaries
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SourcePackagePublishingHistory(BaseWrapper):
|
class SourcePackagePublishingHistory(BaseWrapper):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user