mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 22:56:15 +01:00
osc linkpac can not specify cicount attribute
This commit is contained in:
parent
9f739f5e87
commit
92ff8996d4
1
NEWS
1
NEWS
@ -13,6 +13,7 @@
|
||||
- plugins now should be placed in /usr/lib/osc-plugins to match FHS (the /var path is still supported though)
|
||||
- osc now includes automatically generated man page
|
||||
- osc can now store credentials in Gnome keyring if it is available
|
||||
- osc linkpac can not specify cicount attribute
|
||||
|
||||
0.117:
|
||||
- support checkout of single package via "osc co PACKAGE" when local dir is project
|
||||
|
@ -773,6 +773,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
@cmdln.option('-c', '--current', action='store_true',
|
||||
help='link fixed against current revision.')
|
||||
@cmdln.option('-C', '--cicount', choices=['add', 'copy', 'local'],
|
||||
help='cicount attribute in the link, known values are add, copy, and local, default in buildservice is currently add.')
|
||||
@cmdln.option('-r', '--revision', metavar='rev',
|
||||
help='link the specified revision.')
|
||||
def do_linkpac(self, subcmd, opts, *args):
|
||||
@ -823,7 +825,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
print >>sys.stderr, 'Revision \'%s\' does not exist' % rev
|
||||
sys.exit(1)
|
||||
|
||||
link_pac(src_project, src_package, dst_project, dst_package, rev)
|
||||
link_pac(src_project, src_package, dst_project, dst_package, rev, opts.cicount)
|
||||
|
||||
def do_aggregatepac(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: "Aggregate" a package to another package
|
||||
|
11
osc/core.py
11
osc/core.py
@ -2486,7 +2486,7 @@ def replace_pkg_meta(pkgmeta, new_name, new_prj, keep_maintainers = False,
|
||||
root.remove(dp)
|
||||
return ET.tostring(root)
|
||||
|
||||
def link_pac(src_project, src_package, dst_project, dst_package, rev=''):
|
||||
def link_pac(src_project, src_package, dst_project, dst_package, rev='', cicount=''):
|
||||
"""
|
||||
create a linked package
|
||||
- "src" is the original package
|
||||
@ -2512,9 +2512,14 @@ def link_pac(src_project, src_package, dst_project, dst_package, rev=''):
|
||||
else:
|
||||
rev = ''
|
||||
|
||||
if cicount:
|
||||
cicount = 'cicount="%s"' % cicount
|
||||
else:
|
||||
cicount = ''
|
||||
|
||||
print 'Creating _link...',
|
||||
link_template = """\
|
||||
<link project="%s" package="%s" %s>
|
||||
<link project="%s" package="%s" %s %s>
|
||||
<patches>
|
||||
<!-- <apply name="patch" /> apply a patch on the source directory -->
|
||||
<!-- <topadd>%%define build_with_feature_x 1</topadd> add a line on the top (spec file only) -->
|
||||
@ -2522,7 +2527,7 @@ def link_pac(src_project, src_package, dst_project, dst_package, rev=''):
|
||||
<!-- <delete>filename</delete> delete a file -->
|
||||
</patches>
|
||||
</link>
|
||||
""" % (src_project, src_package, rev)
|
||||
""" % (src_project, src_package, rev, cicount)
|
||||
|
||||
u = makeurl(conf.config['apiurl'], ['source', dst_project, dst_package, '_link'])
|
||||
http_PUT(u, data=link_template)
|
||||
|
Loading…
Reference in New Issue
Block a user