1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 14:56:14 +01: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 0.167.0
- Added --lastsucceeded option for logfile display (requires OBS 2.11) - 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) - 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 * repository, architecture and vm_type from last build is automatically
reused if not specified otherwise. reused if not specified otherwise.
* support building for kiwi products using obsrepositories:/ * support building for kiwi products using obsrepositories:/
* support local building using RedHat rpm-md modules
- fix decoding for osc aggregatepac - fix decoding for osc aggregatepac
0.166.2 0.166.2

View File

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

View File

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