mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-24 17:31:09 +00:00
lpapicache: allow getBinaries(arch=None) to get all archs
this was the previous behavior and some scripts still call with no args. LP: #1862286
This commit is contained in:
parent
5553d98e47
commit
ebe460aad1
@ -608,7 +608,7 @@ class DebianSPPH(SourcePackagePublishingHistory):
|
|||||||
"""
|
"""
|
||||||
resource_type = 'source_package_publishing_history'
|
resource_type = 'source_package_publishing_history'
|
||||||
|
|
||||||
def getBinaries(self, arch, name=None, ext=None):
|
def getBinaries(self, arch=None, name=None, ext=None):
|
||||||
Logger.info('Using Snapshot to find binary packages')
|
Logger.info('Using Snapshot to find binary packages')
|
||||||
srcpkg = Snapshot.getSourcePackage(self.getPackageName(),
|
srcpkg = Snapshot.getSourcePackage(self.getPackageName(),
|
||||||
version=self.getVersion())
|
version=self.getVersion())
|
||||||
@ -1228,7 +1228,7 @@ class SnapshotSPPH(object):
|
|||||||
new_entries.append(str(block))
|
new_entries.append(str(block))
|
||||||
return ''.join(new_entries)
|
return ''.join(new_entries)
|
||||||
|
|
||||||
def getBinaries(self, arch, name=None, ext=None):
|
def getBinaries(self, arch=None, name=None, ext=None):
|
||||||
return [b.getBPPH()
|
return [b.getBPPH()
|
||||||
for b in self._pkg.getBinaryFiles(arch=arch, name=name, ext=ext)]
|
for b in self._pkg.getBinaryFiles(arch=arch, name=name, ext=ext)]
|
||||||
|
|
||||||
|
@ -794,17 +794,19 @@ class SourcePackagePublishingHistory(BaseWrapper):
|
|||||||
new_entries.append(str(block))
|
new_entries.append(str(block))
|
||||||
return ''.join(new_entries)
|
return ''.join(new_entries)
|
||||||
|
|
||||||
def getBinaries(self, arch, name=None, ext=None):
|
def getBinaries(self, arch=None, name=None, ext=None):
|
||||||
'''
|
'''
|
||||||
Returns the resulting BinaryPackagePublishingHistorys.
|
Returns the resulting BinaryPackagePublishingHistorys.
|
||||||
Must specify arch, or use 'all' to get all archs.
|
If arch is specified, it returns binaries for only that arch,
|
||||||
|
plus any binaries with arch 'all'. If arch is not specified, or
|
||||||
|
if arch is specified as 'all', all archs are returned.
|
||||||
|
|
||||||
If name is specified, only returns BPPH matching that (regex) name.
|
If name is specified, only returns BPPH matching that (regex) name.
|
||||||
|
|
||||||
If ext is specified, only returns BPPH matching that (regex) ext.
|
If ext is specified, only returns BPPH matching that (regex) ext.
|
||||||
'''
|
'''
|
||||||
if not arch:
|
if arch == 'all':
|
||||||
raise RuntimeError("Must specify arch")
|
arch = None
|
||||||
|
|
||||||
if self.status in ["Pending", "Published"]:
|
if self.status in ["Pending", "Published"]:
|
||||||
# Published, great! Directly query the list of binaries
|
# Published, great! Directly query the list of binaries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user