1
0
mirror of https://github.com/openSUSE/osc.git synced 2026-01-29 09:13:02 +01:00

3273 Commits

Author SHA1 Message Date
Michael Schroeder
035cd54626 Fix kiwi builds where the project does not define a path
In that case, the packages to setup the build environment are
taken from the repositories defined in the kiwi file. Osc did
not take into account that the build config must match this
path. So it cannot just get the build config like with normal
builds, but must use a different path.

This led to build errors on some projects like CentOS 7 which
rely on 'Order' statements from the project config.

The OBS backend already had support for this: the 'path' parameter
can be used to overwrite the project path in the _buildconfig
query. We now use this to provide the correct path if we
detect this case. (The detection is currently a heuristic
because OBS does not provide us with a clear indicator.)
2019-04-05 13:45:38 -05:00
Marcus Huewe
2ad1495eec Cleanup the source services execution code in do_build
Always error out if the source services execution failed (the old
code only errored out if the local_service_run config option was
set (this behavior was probably unintentionally introduced in commit
d3dd8539d9 ('- fallback to "build
--local-package" if it does not exist instead of complaining'))).
Also, do not suppress all exceptions (if something failed in the
services execution code path, the user should be informed).

The bug was reported by darix.
2019-03-08 09:15:41 +01:00
lethliel
8851ac7afe fix sorted call on objects (__cmp__ not supported)
fix slowdown of rbl due to f.readline(bufsize) handling.
2019-03-06 15:24:26 +01:00
lethliel
f8c70a1525 fix broken prefer_pkgs logic
osc build -p <dir> and osc buildinfo -p <dir> is now working
again. Root cause was the switch from cpio.py and RPMQuery to
a bytes only interface
2019-02-20 11:14:46 +01:00
lethliel
7dba86ce41 bugfix for broken canonname
b'name'-b'version'-b'release'-b'arch'.rpm --> name-version-release-arch.rpm

* switch shebang to #!/usr/bin/python3 for osc-wrapper.py
* switch regex string to b''
2019-02-14 15:05:07 +01:00
lethliel
212213512d make fetch.py work with new cpio.CpioRead function 2019-02-12 14:01:06 +01:00
lethliel
a3e8e4fd08 osc build now works with new cpio.py 2019-02-12 10:42:10 +01:00
f51354e3ce Return exitcode when "osc results" is falling through prjresults
Otherwise a failure from osc prjresults does not propagate
up.
2019-02-08 11:41:37 +01:00
lethliel
65c98c7dab reworked deleterequest commit (add --all)
* removed superfluous parenthesis
* switched package == None to package is None
2019-02-08 11:41:06 +01:00
b8f9a9cde4 deleterequest for entire projects needs the --all option as additional protection
We had it two times this week that people dropped entire projects
(important ones)
2019-02-08 11:40:27 +01:00
Marcus Huewe
40033cd39b Avoid a potential http request if there are no services
The vc_export_env call was introduced in commit
37ca5535ce ("Export vc env vars when
running a source service") and broke the testsuite. The potential
http request is useless if there are no services. Hence, avoid it.

Thanks to Marco Strigl for catching the testsuite error!
2019-02-08 11:38:42 +01:00
Marcus Huewe
b4e66830d2 Export vc env vars when running a source service
Some services (like the obs_scm) will use them. Note: if realname
or email is not set in the oscrc, an additional http request will
be performed.

This change was requested by darix.
2019-02-08 11:38:15 +01:00
Marcus Huewe
9e8298d8c3 Move vc env exporting code into core.vc_export_env
This allows for reuse. In the future, these variables should also
be exported when executing source services.
2019-02-08 11:37:39 +01:00
lethliel
14bd0f1929 rebase archquery.py with master 2019-02-08 11:33:13 +01:00
Marcus Huewe
bfb1c8b3d7 Add cmp function to packagequery module
cmp(a, b) returns
-1 if a < b
 0 if a == 0
 1 if a > b

This is needed since python3 has no cmp function anymore.

All credits for this go to Marco Strigl <mstrigl@suse.com> (see
PR#483 [1]).

[1] https://github.com/openSUSE/osc/pull/483
2019-02-08 11:32:11 +01:00
Marcus Huewe
59ef033e22 Fix ZeroDivisionException in meter.PBTextMeter
If size is 0, using pb.Percentage will result in a
ZeroDivisionException. Note: the output in case of
size == 0 looks a bit "strange" - for a consistent
output we should probably subclass pb.Percentage.
2019-02-08 11:29:14 +01:00
lethliel
746909cfcd rebase cpio.py with master 2019-02-08 11:09:08 +01:00
Malte
83dff3cc02 improve os_path_samefile 2019-02-08 11:05:46 +01:00
lethliel
34988232b4 rebase ar.py with master 2019-02-08 11:02:02 +01:00
Marcus Huewe
a8450e4355 Simplify rpmquery.unpack_string
There is no need to unpack a single byte because it is not
affected by (byte) endianness (and that's what struct.unpack is
about). Moreover, rpmquery.unpack_string now supports an optional
encoding parameter, which could be used by the python3 port to
decode a string. Note: in general we cannot assume that all strings
in a rpm are utf-8 encoded (it is possible to build a rpm that
contains illegal utf-8 sequences).
2019-02-08 10:54:44 +01:00
lethliel
75731119b3 rebase with master 2019-02-08 10:44:06 +01:00
lethliel
bdce744810 setting Exceptions to None does not work
This is no longer supported in python3. Just set
SSLError, SSLVerificationErrror and RPMError to Exception instead to none
if the modules are not imported.
2019-01-09 15:19:20 +01:00
Marcus Huewe
9ee9165e57 Remove superfluous try-except from meter import
Since commit 8a6abe3a6c ("warn user
if python-progressbar is not installed") it is always safe to import
the meter module (even if the progressbar module is not installed).
2019-01-08 18:15:00 +01:00
lethliel
62043bd385 move missing pb module logic to meter.py 2019-01-08 18:13:51 +01:00
Marco Strigl
4a28448e14 warn user if python-progressbar is not installed
For get_binaries:

move the generation of the progress_obj to commandline.py
and warn the user that python-progressbar is not installed
instead of crashing.
2019-01-08 13:52:00 +01:00
0190177c81 Don't crash if can_also_build does not contain hostarch 2019-01-07 14:32:46 +01:00
lethliel
d39aa59918 get_group_meta and get_user_meta with original behavior. 2018-12-13 14:26:11 +01:00
Fridrich Štrba
a41dd20f17 Do not choke on operators < and > in spec files 2018-12-12 15:05:39 +01:00
c49f8e4ad8 report status as outdated if the scheduler can not re-evaluated the
repository because it needs to wait for other repos first
2018-12-12 15:05:00 +01:00
lethliel
d3994b652d fix osc build --without and --define 2018-12-04 10:14:44 +01:00
lethliel
9497173d3d Merge branch 'python3' of github.com:openSUSE/osc into python3 2018-11-21 11:13:55 +01:00
lethliel
9001d802a5 fixed URLError raise call 2018-11-21 11:13:08 +01:00
Marco Strigl
2873feecd2 switch from 'try_parent == False' to 'not try_parent' 2018-11-20 20:44:30 +01:00
lethliel
0e604dfe91 remove debug print 2018-11-20 16:17:59 +01:00
lethliel
2a1edafdd1 Merge branch 'python3' of github.com:openSUSE/osc into python3 2018-11-20 16:08:32 +01:00
lethliel
91e09b9381 fix for not existent pubkeys added to buildinfo struct 2018-11-20 16:06:01 +01:00
Marco Strigl
16abb522e9 reverted all python3 specific script names 2018-11-15 09:59:33 +01:00
Marco Strigl
c75371a7c5 switched man page back to osc.1.gz 2018-11-15 09:52:01 +01:00
Marco Strigl
0b2cbf6b26 switched version to 1.000 2018-11-15 09:35:20 +01:00
lethliel
4884899574 changed to BytesIO and treat files as BytesIO too 2018-11-13 16:15:35 +01:00
lethliel
3eff8eac3a fixed shebang 2018-11-07 17:36:47 +01:00
lethliel
6db194aee0 fix osc results --xml 2018-11-06 17:24:03 +01:00
lethliel
0f0c12cb55 enable python3 support for osc prjresult --xml 2018-11-06 17:16:47 +01:00
429df0dc70 Add --watch for osc prjresults --xml
Like: osc results --watch
2018-11-06 17:07:36 +01:00
82a222fcb2 Test osc results and prjresults 2018-11-06 17:07:20 +01:00
lethliel
839fedb465 fix broken URLError handling in OscMirrorGroup.urlgrab()
If urlgrab returns a URLError (for example if the Network is unreachable)
the for loop did not continue and the osc build aborts.

Now we also catch the URLError and try the next mirror and return False
correctly if no mirror could be reached. And then try to download it from
api
2018-11-06 17:01:55 +01:00
060f3464d9 Add --no-delay for osc release
This is useful so one can wait with a following osc prjresult until
everything done. Without this one can not know if a release job hasn't
started yet or is already finished.
2018-11-06 09:23:12 +01:00
bfd832b5b0 Fix help for osc token 2018-11-06 09:22:44 +01:00
Marco Strigl
8422ff7157 add --alternative-project option to buildinfo
to be consistent with osc build
2018-11-06 09:22:19 +01:00
lethliel
1f2964a3d1 deleted python3 sepcific wrapper script. 2018-11-06 09:16:32 +01:00