1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00
Commit Graph

3736 Commits

Author SHA1 Message Date
lethliel
a47a0a5f3c open 0.172.0 development 2020-11-10 14:31:25 +01:00
lethliel
528991829f release 0.171.0 2020-11-10 14:25:02 +01:00
Marcus Huewe
0d78560e5d Do not retrieve the package list when initializing a project via osc init
Currently, when trying to initialize a non existent (server-side)
project via "osc init <prj>", osc errors out (after creating the wc)
because it fails to retrieve the package list. However, there is no
need to retrieve the package list in the "osc init <prj>" case. Hence,
skip the package list retrieval. As a result, osc does not error out.

For the background, see the discussion in #858 ("osc fails to check
out an empty project as project") [1].

[1] https://github.com/openSUSE/osc/issues/858#issuecomment-722330024
2020-11-05 13:13:07 +01:00
Marcus Huewe
699827d091 Merge branch 'checkRevision_meta_mode' of https://github.com/marcus-h/osc into master
Fix show_upstream_rev call in checkRevision in the meta=True
case.
2020-10-27 01:08:23 +01:00
Marcus Huewe
4ee9c1ad38 Merge branch 'fix_readme' of https://github.com/dcermak/osc into master
Fix bugzilla URL. Alternatively, we could also directly point to
https://github.com/openSUSE/osc/issues/new.
2020-10-14 21:05:11 +02:00
3956abbd3c
Replace link to novell Bugzilla with openSUSE's Bugzilla 2020-10-14 17:02:34 +02:00
Marcus Huewe
b573f02eb4 Fix show_upstream_rev call in checkRevision
If meta=True is passed to checkRevision, the meta parameter is used
as a revision in the show_upstream_rev call. Instead, it should be
bound to show_upstream_rev's meta parameter.
2020-10-13 19:35:08 +02:00
Marcus Huewe
89bb15d3b6 Add .old dir support for source services
Some services expect "old" service files (that is, files from a
previous service run) to be present in an ".old" dir. Hence, osc
should support that.
Instead of removing all files from a previous service run, move them
to the ".old" dir, run the services, and, finally, remove the ".old"
dir.
Unfortunately, the location of the ".old" dir is hardcoded in the
specific services. That is, we have to be careful if an ".old" dir
exists (in this case, we error out).

Based on [1].

[1] https://github.com/openSUSE/osc/pull/846
2020-10-01 14:03:10 +02:00
Marco Strigl
7b5d105523
Merge pull request #841 from lethliel/add_proper_repourls
add proper reporuls
2020-09-22 11:55:33 +02:00
lethliel
eaf50dd13d add proper reporuls
for use in Arch, Debian and Ubuntu
2020-09-22 08:52:57 +02:00
3cb40c51b1
Merge pull request #836 from marcus-h/preinstallimage_offline
Support a preinstallimage in combination with the --offline option
2020-09-08 09:06:46 +02:00
Marcus Huewe
e58abf1527 Support a preinstallimage in combination with the --offline option
Currently, if the --offline option is passed to "osc build ...", a
preinstallimage is not used (even if it exists). Instead, a
preinstallimage should be used (if it exists) even if the --offline
option is specified.
2020-09-07 18:54:59 +02:00
Marco Strigl
1649fe47df
Merge pull request #834 from adrianschroeter/github_hack
catch URLs to github.com and gitlab.com as git repos
2020-09-01 14:10:16 +02:00
9b245db224 catch URLs to github.com and gitlab.com as git repos
yes, ugly, but I am tired to explain people to add a .git suffix
to get the right mode for "osc add"
2020-09-01 13:50:18 +02:00
Marco Strigl
5bf40aa9a4
Merge pull request #830 from adrianschroeter/owner
maintainer search: lookup via package name by default and binary as fallback
2020-09-01 13:25:21 +02:00
36fc925ee0 maintainer search: lookup via package name by default and binary as fallback
This is faster in best case since the binary search does not need
to be executed on the server.

It also finds package names where no binary with that name exists.
(as for some multibuild cases)
2020-08-31 13:53:41 +02:00
Marco Strigl
d3acec44e3
Merge pull request #833 from mcepl/ignore_SIGNWINCH
Ignore signal.SIGWINCH.
2020-08-31 10:38:07 +02:00
bf7899da83
Ignore signal.SIGWINCH.
Fixes #584
2020-08-27 16:56:36 +02:00
Marcus Huewe
a57b8a60b2 Merge branch 'help-rdiff-p-in-archives' of https://github.com/JanZerebecki/osc
Improve the documentation of the "rdiff" command + its "--plain" option.
2020-08-25 18:44:56 +02:00
294aaa0dd7
help rdiff: -p shows diff of files in archives
This was undocumented.

Also remove the part that incorrectly says this is the default.
2020-08-25 18:14:02 +02:00
Marcus Huewe
8dd9cbef39 Merge branch 'help-workerinfo' of https://github.com/JanZerebecki/osc
Improve documentation of the "workerinfo" command (make the abstract
"workername" more precise (hostarch:workerid)).
2020-08-25 17:50:56 +02:00
75934c995c
fix content of osc workerinfo --help
Replace usage with better explanation. It was missing that it requires a
prefixed hostarch. Also workername is instead called workerid in the
API.

Usage help was before: osc workerinfo WORKER

Add actual example.

See also the fix for this in OBS API docs:
https://github.com/openSUSE/open-build-service/pull/10024
2020-08-25 16:42:01 +02:00
Marco Strigl
568cb38e3d
Merge pull request #828 from lethliel/implement_normal_release_request
implement releaserequest for non-maintenance prj
2020-08-07 09:44:46 +02:00
lethliel
a91b8f051e implement releaserequest for non-maintenance prj
In the API a new request action release was implemented. This changes
enables the user to create a release request for non-maintenance projects
and to review / view the release requests
2020-08-06 21:52:53 +02:00
Marcus Huewe
3216a56d08 Merge branch 'fix-single-service-run' of https://github.com/cmurphy/osc
Fix "osc service run <service>" so that it takes the parameters from
the _service file if <service> is present in the _service file. Also
document (+ fix) the (undocumented) "osc service <command> <service>"
behavior. This enables, for instance, to run "osc service mr foobar",
which would execute all foobar services with mode "manual" (now, this
also works, if the foobar service is not part of the _service file).
2020-08-04 09:13:07 +02:00
Colleen Murphy
cb6eaf3720 Fix single service disabled run
Without this patch, running an individual service that has parameters
defined in the _service file fails:

  $ osc service run obs_scm
  Please specify valid --scm=... options
  Aborting: service call failed:  /usr/lib/obs/service/obs_scm --outdir [snipped]

This is because although the service is defined in the _service file and
the "scm" parameter is set in it, the service wasn't being found in the
data structure and so the service executable wasn't being called with
the parameters supplied in the _service file. This patch corrects the
issue with the services data structure so that the service data isn't
overridden if it is defined in the _service file.

A side effect of this correction for services defined in the _service
file is that instead of overriding the service mode with '', the mode is
taken from the _service file. When using the "run" command, this would
mean that the call mode of None may not be in agreement with the service
mode defined in the file, e.g. "manual", and so the "run" command would
no longer cause it to run when it would before. We can take this
opportunity to define this as the correct behavior - the "run" command
now only runs services with "trylocal", "localonly", or no mode set -
and also ensure that other call mode commands result in sensible
behavior when called with a service name, for instance "osc service
manualrun download_files" will run only services with mode="manual" and
name="download"files" instead of all services with mode="manual".
Additionally, services that aren't defined in the _service file can be
called with a call mode command and will use that call mode rather than
None.
2020-08-03 18:01:30 -07:00
Marcus Huewe
7612fe1614 Merge branch 'undeprecate-disabledrun' of https://github.com/cmurphy/osc
Add a "manual" service mode. A service with mode "manual" is not executed
by default (that is, via "osc service run"). As of now, "manual" is in
some sense just an alias for "disabled". However, this might change in the
future [1]. Also, "localrun" now executes services with mode "serveronly".
Moreover, the documentation of "disabledrun" is updated ("disabledrun"
never executed services with mode "serveronly"). Additionally, "localrun"
and "disabledrun" are marked as "[n]ot for common usage anymore" in the
service command's description.
The rationale for these changes is (partly) described in [1]. The main
motivation is to add some clarity (in contrast to the "disabled" mode,
it is probably easier to get/guess the semantics of the "manual" mode).

[1] https://github.com/openSUSE/osc/pull/826
2020-07-31 15:01:23 +02:00
Colleen Murphy
894b97d471 Add command "manualrun" to replace "disabledrun"
The "disabledrun" service commands is marked as deprecated but has no
explicit replacement. It is still a useful command for updating packages
manually or through a CI system without being forced to run all defined
services with the "runall" command. This change adds a new command
"manualrun" and a new mode "manual" which behave the same as the
deprecated "disabledrun" command and "disabled" mode but have clearer
meaning. "manualrun" does not attempt backwards-compatible behavior with
the "disabledrun" mode for "disabled" services because "disabled" mode
may eventually be removed or change meaning. The "localrun" command is
enhanced to consider the "serveronly" mode. Since "disabledrun" never
executed services with mode "serveronly", its docs are updated
accordingly.
2020-07-30 14:26:47 -07:00
Marco Strigl
bf7e483c33
Merge pull request #827 from kevinsmia1939/patch-1
Update build.py
2020-07-26 20:38:32 +02:00
Kevin Tee
783544d2da
Update build.py
Fix repeated word.
2020-07-26 11:57:18 +00:00
Marcus Huewe
077138e5ad Merge branch 'detailed_error_int_review' of https://github.com/lethliel/osc
Be more verbose in case of an HTTPError in core.request_interactive_review.
2020-07-22 23:16:57 +02:00
lethliel
0ef77b8cd7 print detailed error message in interactive review
Print the details of a Bad Request also in interactive review mode.
2020-07-22 20:20:09 +02:00
lethliel
55d3f46ac0 open 0.171.0 development 2020-07-09 10:27:10 +02:00
lethliel
ead43243db release 0.170.0 2020-07-09 09:57:53 +02:00
Marcus Huewe
76eafc92b5 Merge branch 'print_links_in_mr' of https://github.com/lethliel/osc
Print a link to webui if a new maintenance request is created and
the "print_web_links" config option is enabled.
2020-07-07 17:50:48 +02:00
lethliel
ce794cb37d print web links on osc mr
print web_links also on maintenance requests when print_web_links=1
is configured in oscrc
2020-07-07 17:31:20 +02:00
Marcus Huewe
ea8c6e1c45 Merge branch 'overhaul_do_service' of https://github.com/lethliel/osc
Improve error message in do_service a bit. The old "Too few arguments."
was misleading (for instance, if a non-remote command was not executed
in a package wc).

Note: with the new logic we could also get rid of the
"raise oscerr.WrongArgs('Local directory is no package')" statement.
2020-07-07 17:19:38 +02:00
Marcus Huewe
aa855b1c69 Merge branch 'filter_results_based_on_code' of https://github.com/lethliel/osc
Add a --status-filter option to "osc results" that can be used to
show, for instance, only the repos where a package failed to build. As
a short circuit, a -f/--failed option is added, too.
Add a --brief option to "osc prjresults" and "osc results" that can be
used to get a more compact representation of the results. In case of
"osc results", --brief is ignored if the results for a package are
requested.
2020-07-07 17:08:32 +02:00
lethliel
f2f80a1498 fix error message if osc service not in cwd
fix the error message if osc servce is run without [proj] [pack] arguments
in a non-valid osc working directory.
2020-07-07 08:31:35 +02:00
lethliel
2f0918b93e add brief results/prjresults with filtered code
in do_results:
  * add --brief option on prj level:
    [packagename] [repo] [arch] [buildstatus]
  * filter by --status-filter <long status name>
    works on prj and pkg level

in do_prjresults:
  * --brief
  * assume len(state)>1 as long state

core.py
  * filter packages by build status
  * long status handling in get_prj_results
  * brief output generation in get_prj_results
2020-07-07 08:23:02 +02:00
Marcus Huewe
ce291abac6 Merge branch 'fix_string_literal_in_commit_msg' of https://github.com/lethliel/osc
Interprete unicode escape characters in a "--message" option. In some
cases, this breaks the existing UI (but that's OK because it can be
fixed by properly escaping the escape character(s)).
Note: if we are going to do more advanced stuff in the future, we should
move the logic into a separate function.
2020-06-29 23:53:32 +02:00
lethliel
16fda3115c interpretation of string literals in messages
string literals are not interpreted correctly when using -m "my\ntwo line message"
2020-06-26 17:42:35 +02:00
Marco Strigl
b13935adf7
Merge pull request #815 from marcus-h/python2_decode_it_fix
Fix python2 regression in util.helper.decode_it
2020-06-25 17:53:14 +02:00
Marcus Huewe
d85030b72d Fix python2 regression in util.helper.decode_it
In commit 276d6e2439 ("Do not use the
chardet module in util.helper.decode_it") util.helper.decode_it was
changed to always decode the passed object if it has a decode method.
Since a python2 str has a decode method, the new code tries to utf-8
decode the passed str. As a result, a unicode object is returned (if
the decoding worked). Since a unicode object is not an instance of
type str, all subsequent isinstance(decoded_obj, str) checks evaluate
to False, which break some codepaths.
In order to fix this, restore the old python2 behavior (that is, if
the passed object is a str, it is not decode it). This change does not
affect the python3 codepaths.

Fixes: #814 ("osc log | fails")
2020-06-25 15:38:14 +02:00
Marcus Huewe
050c94dcf3 Merge branch 'fix_issues_diff' of https://github.com/lethliel/osc
Improve "osc rdiff --issues-only ..." output: now, it shows the added,
deleted and changed issues. Also, add a new "osc rdiff --xml ..." option,
which only works in combination with the "--issues-only" option: it prints
the raw xml.

Note: server_diff_noex has no option for the "full" parameter. Hence,
with the addition of the "xml=False" parameter, the signatures of the
server_diff_noex and server_diff functions are going to differ "forever".
That's OK (IMHO) because it is probably more sane to simply specify the
additional args via the kwargs syntax.
2020-06-15 22:42:16 +02:00
lethliel
a1df48145b Add more infos to issues rdiff
Show the state of the issues (added, deleted, changed)
of the issues in a list.

Also --xml can now be given to get the raw xml output from the server.
2020-06-15 20:53:38 +02:00
Marcus Huewe
dd814054ee Merge branch 'remove_dead_code' of https://github.com/lethliel/osc
Remove dead code from the fetch module. Actually, it should have
been removed in commit 95ec7dee7b
('- fixed #590606 ("osc/fetch.py does not support authenticated URLs")').
2020-06-08 21:32:42 +02:00
lethliel
297b050f1e remove dead opener code
The opener is generated but never used.
Since commit 95ec7dee7b
2020-06-08 20:31:28 +02:00
Marcus Huewe
a87d2c1202 Document a potential decoding issue in print_buildlog
We should reconsider this in the future (in practice, it does not
seem to cause too much trouble (at least I'm not aware of any bug
reports)).
2020-06-04 15:09:03 +02:00
Marco Strigl
869772f054
Merge pull request #803 from marcus-h/remove_chardet_decoding
Do not use the chardet module in util.helper.decode_it
2020-06-04 15:00:37 +02:00