1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-23 06:48:51 +02:00

add and implement ccache option for getbinaries

If this option is used, the api is asked to list ccache archive if
present, osc will then download the archive.
This commit is contained in:
Sumit Jamgade
2020-05-05 09:58:16 +02:00
parent 9aa3777a60
commit 5557a06e5b
2 changed files with 8 additions and 3 deletions

View File

@@ -5654,9 +5654,12 @@ def get_repos_of_project(apiurl, prj):
for node2 in node.findall('arch'):
yield Repo(node.get('name'), node2.text)
def get_binarylist(apiurl, prj, repo, arch, package=None, verbose=False):
def get_binarylist(apiurl, prj, repo, arch, package=None, verbose=False, withccache=False):
what = package or '_repository'
u = makeurl(apiurl, ['build', prj, repo, arch, what])
query = {}
if withccache:
query['withccache'] = 1
u = makeurl(apiurl, ['build', prj, repo, arch, what], query=query)
f = http_GET(u)
tree = ET.parse(f)
if not verbose: