mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 18:46:17 +01:00
- support "addcontainers" command
This commit is contained in:
parent
d756f56af2
commit
628f7e2cf5
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
0.163
|
0.163
|
||||||
- add sendsysrq command (requires OBS 2.10)
|
- add sendsysrq command (requires OBS 2.10)
|
||||||
|
- add addcontainers command (requires OBS 2.10)
|
||||||
- add new options to diff command:
|
- add new options to diff command:
|
||||||
--unexpand for local diffs only (bsc#1089025)
|
--unexpand for local diffs only (bsc#1089025)
|
||||||
--meta for diffing meta files
|
--meta for diffing meta files
|
||||||
|
@ -449,6 +449,41 @@ class Osc(cmdln.Cmdln):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
@cmdln.option('--extend-package-names', default=False, action="store_true",
|
||||||
|
help='Extend packages names with project name as suffix')
|
||||||
|
def do_addcontainers(self, subcmd, opts, *args):
|
||||||
|
"""${cmd_name}: Add maintained containers for a give package
|
||||||
|
|
||||||
|
The command adds all containers which are marked as maitained and contain
|
||||||
|
an rpm out of the specified source package.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
osc addcontainers [PROJECT PACKAGE]
|
||||||
|
${cmd_option_list}
|
||||||
|
"""
|
||||||
|
|
||||||
|
apiurl = self.get_api_url()
|
||||||
|
localdir = os.getcwd()
|
||||||
|
project = package = None
|
||||||
|
if not args:
|
||||||
|
if is_package_dir(localdir):
|
||||||
|
project = store_read_project(localdir)
|
||||||
|
package = store_read_package(localdir)
|
||||||
|
else:
|
||||||
|
project = args[0]
|
||||||
|
package = args[1]
|
||||||
|
|
||||||
|
if project == None or package == None:
|
||||||
|
raise oscerr.WrongArgs('Either specify project and package or call it from a package working copy')
|
||||||
|
|
||||||
|
query = {'cmd': 'addcontainers'}
|
||||||
|
if opts.extend_package_names:
|
||||||
|
query['extend_package_names'] = '1'
|
||||||
|
|
||||||
|
print("Add containers...")
|
||||||
|
url = makeurl(apiurl, ['source', project, package], query=query)
|
||||||
|
f = http_POST(url)
|
||||||
|
|
||||||
@cmdln.option('-s', '--skip-disabled', action='store_true',
|
@cmdln.option('-s', '--skip-disabled', action='store_true',
|
||||||
help='Skip disabled channels. Otherwise the source gets added, but not the repositories.')
|
help='Skip disabled channels. Otherwise the source gets added, but not the repositories.')
|
||||||
@cmdln.option('-e', '--enable-all', action='store_true',
|
@cmdln.option('-e', '--enable-all', action='store_true',
|
||||||
|
Loading…
Reference in New Issue
Block a user