mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
Fix handling of meta command within local working directory
* Fix osc ignoring -A apiurl command option when arguments are less than 2 and executed within local working copy * Enhance handling of meta command within local working copy. - meta prj: Try to use project and apiurl of local working copy if no arguments are passed - meta pkg: Try to use project and apiurl of local working copy if one argument is passed (single argument assumed to be package name), and try to use project, package and apiurl if no arguments are passed
This commit is contained in:
parent
7b3b9ebc0f
commit
a33c40eb53
@ -731,21 +731,29 @@ class Osc(cmdln.Cmdln):
|
||||
raise oscerr.WrongArgs('Too many arguments.')
|
||||
|
||||
apiurl = self.get_api_url()
|
||||
if len(args) < 2:
|
||||
apiurl = store_read_apiurl(os.curdir)
|
||||
|
||||
# specific arguments
|
||||
# Specific arguments
|
||||
#
|
||||
# If project or package arguments missing, assume to work
|
||||
# with project and/or package in current local directory.
|
||||
attributepath = []
|
||||
if cmd in ['pkg', 'prj', 'prjconf' ]:
|
||||
if len(args) == 0:
|
||||
if cmd in ['prj', 'prjconf']:
|
||||
if len(args) < 1:
|
||||
apiurl = store_read_apiurl(os.curdir)
|
||||
project = store_read_project(os.curdir)
|
||||
else:
|
||||
project = args[0]
|
||||
|
||||
if cmd == 'pkg':
|
||||
elif cmd == 'pkg':
|
||||
if len(args) < 2:
|
||||
apiurl = store_read_apiurl(os.curdir)
|
||||
project = store_read_project(os.curdir)
|
||||
if len(args) < 1:
|
||||
package = store_read_package(os.curdir)
|
||||
else:
|
||||
package = args[0]
|
||||
else:
|
||||
project = args[0]
|
||||
package = args[1]
|
||||
|
||||
elif cmd == 'attribute':
|
||||
|
Loading…
Reference in New Issue
Block a user