mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
Add BinaryPackagePublishingHistory to lpapicache
This commit is contained in:
parent
dd7c37e130
commit
2e217ac51e
@ -146,8 +146,8 @@ def locate_package(package, distribution):
|
|||||||
def request_backport(package_spph, source, destinations):
|
def request_backport(package_spph, source, destinations):
|
||||||
|
|
||||||
published_binaries = set()
|
published_binaries = set()
|
||||||
for bpph in package_spph._lpobject.getPublishedBinaries():
|
for bpph in package_spph.getBinaries():
|
||||||
published_binaries.add(bpph.binary_package_name)
|
published_binaries.add(bpph.getPackageName())
|
||||||
|
|
||||||
testing = []
|
testing = []
|
||||||
testing += ["You can test-build the backport in your PPA with "
|
testing += ["You can test-build the backport in your PPA with "
|
||||||
|
@ -352,6 +352,7 @@ class SourcePackagePublishingHistory(BaseWrapper):
|
|||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
self._changelog = None
|
self._changelog = None
|
||||||
|
self._binaries = None
|
||||||
# Don't share _builds between different
|
# Don't share _builds between different
|
||||||
# SourcePackagePublishingHistory objects
|
# SourcePackagePublishingHistory objects
|
||||||
if '_builds' not in self.__dict__:
|
if '_builds' not in self.__dict__:
|
||||||
@ -408,6 +409,16 @@ class SourcePackagePublishingHistory(BaseWrapper):
|
|||||||
new_entries.append(unicode(block))
|
new_entries.append(unicode(block))
|
||||||
return u''.join(new_entries)
|
return u''.join(new_entries)
|
||||||
|
|
||||||
|
def getBinaries(self):
|
||||||
|
'''
|
||||||
|
Returns the resulting BinaryPackagePublishingHistorys
|
||||||
|
'''
|
||||||
|
if self._binaries is None:
|
||||||
|
self._binaries = [BinaryPackagePublishingHistory(bpph)
|
||||||
|
for bpph in
|
||||||
|
self._lpobject.getPublishedBinaries()]
|
||||||
|
return self._binaries
|
||||||
|
|
||||||
def _fetch_builds(self):
|
def _fetch_builds(self):
|
||||||
'''Populate self._builds with the build records.'''
|
'''Populate self._builds with the build records.'''
|
||||||
builds = self.getBuilds()
|
builds = self.getBuilds()
|
||||||
@ -460,6 +471,31 @@ class SourcePackagePublishingHistory(BaseWrapper):
|
|||||||
self.getPackageName(), '\n'.join(res))
|
self.getPackageName(), '\n'.join(res))
|
||||||
|
|
||||||
|
|
||||||
|
class BinaryPackagePublishingHistory(BaseWrapper):
|
||||||
|
'''
|
||||||
|
Wrapper class around a LP binary package object.
|
||||||
|
'''
|
||||||
|
resource_type = 'binary_package_publishing_history'
|
||||||
|
|
||||||
|
def getPackageName(self):
|
||||||
|
'''
|
||||||
|
Returns the binary package name.
|
||||||
|
'''
|
||||||
|
return self._lpobject.binary_package_name
|
||||||
|
|
||||||
|
def getVersion(self):
|
||||||
|
'''
|
||||||
|
Returns the version of the binary package.
|
||||||
|
'''
|
||||||
|
return self._lpobject.binary_package_version
|
||||||
|
|
||||||
|
def getComponent(self):
|
||||||
|
'''
|
||||||
|
Returns the component of the binary package.
|
||||||
|
'''
|
||||||
|
return self._lpobject.component_name
|
||||||
|
|
||||||
|
|
||||||
class MetaPersonTeam(MetaWrapper):
|
class MetaPersonTeam(MetaWrapper):
|
||||||
@property
|
@property
|
||||||
def me(cls):
|
def me(cls):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user