1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 17:26:15 +02:00

Merge pull request #697 from adrianschroeter/module_support

support local building using RedHat rpm-md modules
This commit is contained in:
Marco Strigl 2019-12-05 13:11:12 +01:00 committed by GitHub
commit 7391b70d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

4
NEWS
View File

@ -1,6 +1,3 @@
0.168.0
-
0.167.0
- Added --lastsucceeded option for logfile display (requires OBS 2.11)
- osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm)
@ -12,6 +9,7 @@
* repository, architecture and vm_type from last build is automatically
reused if not specified otherwise.
* support building for kiwi products using obsrepositories:/
* support local building using RedHat rpm-md modules
- fix decoding for osc aggregatepac
0.166.2

View File

@ -145,6 +145,9 @@ class Buildinfo:
self.keys = []
self.prjkeys = []
self.pathes = []
self.modules = []
for node in root.findall('module'):
self.modules.append(node.text)
for node in root.findall('bdep'):
p = Pac(node, self.buildarch, self.pacsuffix,
apiurl, localpkgs)
@ -939,6 +942,7 @@ def main(apiurl, opts, argv):
api_host_options = config['api_host_options'],
offline = opts.noinit or opts.offline,
http_debug = config['http_debug'],
modules = bi.modules,
enable_cpio = not opts.disable_cpio_bulk_download,
cookiejar=cookiejar)

View File

@ -28,7 +28,8 @@ from .meter import create_text_meter
class Fetcher:
def __init__(self, cachedir='/tmp', api_host_options={}, urllist=[],
http_debug=False, cookiejar=None, offline=False, enable_cpio=True):
modules = [], http_debug=False, cookiejar=None, offline=False,
enable_cpio=True):
# set up progress bar callback
self.progress_obj = None
if sys.stdout.isatty():
@ -36,6 +37,7 @@ class Fetcher:
self.cachedir = cachedir
self.urllist = urllist
self.modules = modules
self.http_debug = http_debug
self.offline = offline
self.cpio = {}
@ -59,6 +61,8 @@ class Fetcher:
return
query = ['binary=%s' % quote_plus(i) for i in pkgs]
query.append('view=cpio')
for module in self.modules:
query.append('module=' + module)
try:
url = makeurl(apiurl, ['build', project, repo, arch, package], query=query)
sys.stdout.write("preparing download ...\r")