Deleting a conflict file (state 'C') during an update operation results
in an inconsistent working copy. To fix this, we remove the conflict
file from the _in_conflict list.
If a package does not exist on the server, the
Serviceinfo.getProjectGlobalServices call results in a 404. In this
case, we try it again with the _project package (note: this does not
take potential "linked" services into account, if the local package
is a _link).
Fixes: #277 ("404 on running service for non commited package")
Do not pass a family parameter to SSL.Connection's constructor if it
does not support it. If the family parameter is not supported, we
_try_ to fallback to socket.AF_INET, which is implicitly used by
older versions of the SSL.Connection class.
Fixes: #274 ("osc 0.157 Exception AttributeError: "Connection
instance has no attribute 'ssl_close_flag'"")
Adds a "--multibuild-package" option to the following commands:
buildlog, remotebuildlog, buildinfo, build, buildhistory, jobhistory,
rebuild, restartbuild/abortbuild, wipebinaries, getbinaries
This change makes basic authentication fail after first unsuccessful
attempt (instead of automatically retrying) and thus prevents unnecessary
failed login attempts.
This change also allows printing the contents of an HTTP 401 message to
the user.
If build-root contains %(package) substitution, --local-package builds
would substitute absolute path there. This is different than the rule used
in osc chroot (uses relative path), causing the chroot to fail by default.
This commit removes the directory part from both build-root substitutions.
Follow-up commit for 8c45eb64ade699ce3d8717f460b3064ca3ab3a58 (just to
make sure that the "apiurl" attribute is always part of the Serviceinfo
class...)
At the moment only the project status is taken into account when determining when to stop watching a build.
This leads to wrong behavior when a package is in 'blocked' for a longer time.
In this state the project status and code is 'published' but the package remains at 'blocked'.
With this additional check this problem is fixed.
This is used to turn "dir" into a package and add it to the version
control (got broken in commit b6f7d1be6c).
Integrated the obscpio code that was introduced in commit
b6f7d1be6c into core.addFiles (XXX: we
should get rid of the run_external(..., shell=True) code).
The bogus check is twofold: the first error is due to a wrong
refactoring (repostate was intended to be the "code" attribute
and "code" was supposed to the "code" attribute of the status
node) (see commit f3a1d12a). The second error is a logic error
in the original code, because the package state "succeeded" and
the repostate "unpublished" is a valid combination. Consequently,
the check didn't make any sense...
This is up for discussion, but I try to simplify the interface here:
- obsolete "localrun" and "disabledrun". Still implemented, but not anymore
recommended and documented. can hopefully removed later.
- "runall" is running all services local, also buildtime services
- files get replaced by the service
- can be used to get final tar balls to be used with tools like quilt
This reverts commit c53a7681ef (for now!).
It seems to break local obs instances (see issue #202) (this needs
further debugging). Moreover, it breaks the python 3.4 - excerpt
from a travis run:
======================================================================
ERROR: test_added_missing2 (test_commit.TestCommit)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/python/3.4.2/lib/python3.4/urllib/request.py", line 1111, in do_request_
mv = memoryview(data)
TypeError: memoryview: _io.BufferedReader object does not have the buffer interface
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/openSUSE/osc/tests/common.py", line 122, in wrapped_test_method
test_method(*args)
File "/home/travis/build/openSUSE/osc/tests/common.py", line 122, in wrapped_test_method
test_method(*args)
File "/home/travis/build/openSUSE/osc/tests/common.py", line 122, in wrapped_test_method
test_method(*args)
File "/home/travis/build/openSUSE/osc/tests/common.py", line 122, in wrapped_test_method
test_method(*args)
File "/home/travis/build/openSUSE/osc/tests/common.py", line 122, in wrapped_test_method
test_method(*args)
File "/home/travis/build/openSUSE/osc/tests/test_commit.py", line 290, in test_added_missing2
p.commit()
File "/home/travis/build/openSUSE/osc/tests/osc/core.py", line 1471, in commit
self.put_source_file(filename, tdir)
File "/home/travis/build/openSUSE/osc/tests/osc/core.py", line 1319, in put_source_file
http_PUT(u, file = tfilename)
File "/home/travis/build/openSUSE/osc/tests/osc/core.py", line 3243, in http_PUT
def http_PUT(*args, **kwargs): return http_request('PUT', *args, **kwargs)
File "/home/travis/build/openSUSE/osc/tests/osc/core.py", line 3231, in http_request
fd = urlopen(req, data=data)
File "/opt/python/3.4.2/lib/python3.4/urllib/request.py", line 153, in urlopen
return opener.open(url, data, timeout)
File "/opt/python/3.4.2/lib/python3.4/urllib/request.py", line 453, in open
req = meth(req)
File "/opt/python/3.4.2/lib/python3.4/urllib/request.py", line 1116, in do_request_
data))
ValueError: Content-Length should be specified for iterable data of type <class '_io.BufferedReader'> <_io.BufferedReader name='/tmp/osc_test571whun4/osctest/added_missing/.osc/_in_commit/bar'>
This is up for discussion, but I try to simplify the interface here:
- obsolete "localrun" and "disabledrun". Still implemented, but not anymore
recommended and documented. can hopefully removed later.
- "runall" is running all services local, also buildtime services
- files get replaced by the service
- can be used to get final tar balls to be used with tools like quilt
Note: this commit "breaks" the existing get_package_results api, because
it returns a generator, which yields a result xml, instead of a list of
result dicts.
In this case, "osc bl repo" behaves more or less the same as "osc rbl repo"
(in case no corresponding .osc/_buildinfo file exists, we default to
repo and hostarch).
Since python >= 2.7.9 urllib2/httplib verifies the ssl cert by default - so
make sure that this "builtin" ssl check is disabled as well if
"sslcertck" is disabled. Fixes#179.
Note: eventually, we should abandon m2crypto and use urllib2/httplib to
verify the ssl cert.