mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-23 05:26:16 +01:00
- stay backward compatible with pathinfo command. This default will switch, when we switch to new
maintenance modell on api.opensuse.org
This commit is contained in:
parent
1db5eea95c
commit
402ce3a626
@ -405,6 +405,8 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
@cmdln.option('-f', '--force', action='store_true',
|
@cmdln.option('-f', '--force', action='store_true',
|
||||||
help='force generation of new patchinfo file')
|
help='force generation of new patchinfo file')
|
||||||
|
@cmdln.option('-n', '--new', action='store_true',
|
||||||
|
help='Use new, OBS 2.3 style patchinfo format. Will become default on release of OBS 2.3.')
|
||||||
@cmdln.option('--force-update', action='store_true',
|
@cmdln.option('--force-update', action='store_true',
|
||||||
help='drops away collected packages from an already built patch and let it collect again')
|
help='drops away collected packages from an already built patch and let it collect again')
|
||||||
def do_patchinfo(self, subcmd, opts, *args):
|
def do_patchinfo(self, subcmd, opts, *args):
|
||||||
@ -432,13 +434,15 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
if opts.force or not patchinfo:
|
if opts.force or not patchinfo:
|
||||||
print "Creating initial patchinfo..."
|
print "Creating initial patchinfo..."
|
||||||
query='cmd=createpatchinfo&new_format=1'
|
query='cmd=createpatchinfo'
|
||||||
|
if opts.new:
|
||||||
|
query='&new_format=1'
|
||||||
if args and args[0]:
|
if args and args[0]:
|
||||||
query += "&name=" + args[0]
|
query += "&name=" + args[0]
|
||||||
url = makeurl(apiurl, ['source', project], query=query)
|
url = makeurl(apiurl, ['source', project], query=query)
|
||||||
f = http_POST(url)
|
f = http_POST(url)
|
||||||
for p in meta_get_packagelist(apiurl, project):
|
for p in meta_get_packagelist(apiurl, project):
|
||||||
if p.startswith("_patchinfo:"):
|
if p.startswith("_patchinfo:") or p.startswith("patchinfo"):
|
||||||
patchinfo = p
|
patchinfo = p
|
||||||
|
|
||||||
# CAUTION:
|
# CAUTION:
|
||||||
|
Loading…
Reference in New Issue
Block a user