* 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
If the package is linked to a different project, osc will ask
permision to branch the package in the current project before
commiting.
Show a message in osc meta pkg -e in the same case.
It seems that os.utime raises EINVAL if the file resides on a nfs
share. Since osc itself does not rely on the correct utime, we simply
ignore this exception.
The string.encode('bz2') does not work in python3. Implement
passx_encode/passx_decode functions compatible with python 2.6, 2.7 and
3.3.
Add a simple unit test.
The reason of the crash is that not all targets are always defined for
all packages. In our environment it happens when linked project is
created and sources have just been uploaded to one package.
Here is the crash:
Traceback (most recent call last):
File "../tools-testing/build-package", line 313, in <module>
sys.exit(main(sys.argv))
File "../tools-testing/build-package", line 309, in main
return build(apiurl, tproject, package, timeout)
File "../tools-testing/build-package", line 226, in build
hide_legend=True, csv=True)
File "/usr/lib/python2.7/site-packages/osc/core.py", line 5135, in get_prj_results
row = [pac] + [status[pac][tg] for tg in targets]
status[pac]]
KeyError: ('Fedora_18', 'i586', 'outdated')
Please note that this fix fixes only csv mode. For other modes osc still
can crash, but it's hard to reproduce here as we're not using them.
Signed-off-by: Ed Bartosh <bartosh@gmail.com>