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

1439 Commits

Author SHA1 Message Date
lethliel
fe642db042 [python3] python3 support for commandline module
* use cmp_to_key from functools for python 2.7 and higer
* use self written cmp_to_key for python 2.6
* a lot of bytestring handling and decoding
2019-04-12 09:58:23 -05:00
Marcus Huewe
c39c3b8cae 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-02-22 15:42:23 +01:00
lethliel
0ab8661a8b reworked deleterequest commit (add --all)
* removed superfluous parenthesis
* switched package == None to package is None
2019-02-04 14:56:20 +01:00
Marco Strigl
4b4774872e
Merge pull request #509 from adrianschroeter/deletereq
deleterequest for entire projects needs the --recursive option as add…
2019-02-04 14:52:25 +01:00
a760e2bd39 Return exitcode when "osc results" is falling through prjresults
Otherwise a failure from osc prjresults does not propagate
up.
2019-02-04 13:07:59 +01:00
677c741189 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-04 11:54:03 +01:00
Marcus Huewe
fefd7c1dea 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-01-29 14:20:12 +01:00
lethliel
93d15fc83b reworked meter.py based on discussion
* new function create_text_meter with fallback selection
* NoPBTextMeter.start() will print the basename (if not stated otherise with
  basename = None)
* The callers that should use an alternare TextMeter class now call create_text_meter()
* The callers that should not use and alternate TextMeter (because of different handling,
  like build.py) call create_text_meter(use_pb_fallback=False)
* the warning 'Please install the progressbar module' is now only shown once

improvements
2019-01-16 11:39:40 +01:00
lethliel
8b3c2bd61a improve handling of missing progressbar module
With the NoPBTextMeter class the build view gets broken.
Old view:
1/11 (repo) filename

new view:
Please install the progressbar module...
Please install the progressbar module...
Please install the progressbar module...

With this commit the old behavior is restored.

The getbinaries call now lists the file he downloads instead of just
stating "Please install the progressbar module..." several times.
(but only if not called with the option quiet)
2019-01-11 10:16:02 +01:00
Andreas Schwab
51812b7e93 Don't crash if can_also_build does not contain hostarch 2019-01-04 19:39:18 +01:00
Marcus Huewe
aa88b6b795 Merge branch 'prjresults-watch' of https://github.com/JanZerebecki/osc
Add "--watch" option to "osc prjresults" ("--watch" can only be used
in combination with "--xml").
2018-11-06 16:44:50 +01:00
5e03ffcec9
Add --watch for osc prjresults --xml
Like: osc results --watch
2018-11-06 15:13:08 +01:00
Marcus Huewe
e5478e2ff6 Merge branch 'release-no-delay' of https://github.com/JanZerebecki/osc
Add --no-delay option to the "osc release" command.
2018-11-01 20:07:57 +01:00
Marcus Huewe
d5dd5708d5 Merge branch 'add_alternative_project_to_buildinfo' of https://github.com/lethliel/osc
Add --alternative-project option to the "osc buildinfo" command.
2018-11-01 20:04:04 +01:00
Marcus Huewe
bec52a7917 Merge branch 'python3_prep' of https://github.com/lethliel/osc
Get rid of the urlgrabber dependency. The current implementation of the
progress bar is quite "noisy" if the line length exceeds the size of
the terminal window, but that's something we could fix later. (The
superfluous error message will be fixed in a subsequent commit.)
2018-11-01 19:55:07 +01:00
fb80026651
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-10-31 03:45:17 +01:00
Andreas Schwab
1fab61c875 Fix help for osc token 2018-10-25 10:20:16 +02:00
Marco Strigl
92d15b2d95 add --alternative-project option to buildinfo
to be consistent with osc build
2018-10-23 20:27:43 +02:00
lethliel
65b053abb3 replace urlgrabber to enable python3 compatibility
- new module grabber.py
  * OscMirrorGroup to keep urlgrabber.mirrorgroup behavior
  * OscFileGrabber moved here

- meter.py
  * reworked to use progressbar module instead of progressbar
    of urlgrabber and simplified the module.

- babysitter.py
  * removed URLGrabErrorr

- build.py
  * removed adding of url_local to urllist. (not needed anymore)
  * removed URLGrabError

- commandline.py
  * switched from urlgrabber.urlgrab to OscFileGrabber().urlgrab

- core.py
  * reworked progressbar behavior

- fetch.py
  * removed join_url (not needed anymore)
  * moved OscFileGrabber to grabber.py
  * removed failureReport (not needed anymore)
2018-10-19 09:31:37 +02:00
Marcus Huewe
f12c7747d0 Merge branch 'approver' of https://github.com/adrianschroeter/osc
Introduce "osc request approval..." and "osc request cancelapproval"
commands.
2018-10-18 15:23:06 +02:00
e1fd0b4ee9 add support for approved requests (requires OBS 2.10) 2018-10-18 13:26:39 +02:00
Marcus Huewe
25014c326f Merge branch 'fix_413_get_deleted_sources' of https://github.com/lethliel/osc
Introduce --deleted option to "osc co" for checking out the files of
a deleted package (no package wc is established).
2018-10-18 12:59:55 +02:00
lethliel
0123bb71db fixes 413 checkout deleted package
* altered command do_checkout
  new option -D | --deleted. Can only be used with PACKAGE and needs
  -o to work

* what happens:
  core function checkout_deleted_package fetches the file list of the deleted
  package and saves it to given destdir. If destdir is not existent it
  creates the destination directory. Otherwise the files will be written
  in the existing directory.
2018-10-18 08:59:05 +02:00
c5ec3ce807 support checkconstraints command without local checkout 2018-10-02 10:45:38 +02:00
Johannes Kastl
ba66a0bc1d change keep-link description to make it easier to understand 2018-09-17 20:50:27 +02:00
Marco Strigl
48e71b0255
Merge pull request #438 from andreas-schwab/token
Clarify use of osc token
2018-08-31 11:16:04 +02:00
Marcus Huewe
86e5757832 Refactor the do_vc code a bit
No functional changes.
2018-08-17 22:45:28 +02:00
Andreas Schwab
4eae5d9a45 Clarify use of osc token
Clarify the fact that the parameters of osc token -t and osc token -d are
of different types.
2018-08-12 13:36:24 +02:00
ef13d67208 Export a real name for vc to consume 2018-08-01 09:43:14 -04:00
4cc87b2c57 fix DISTURL checkout for package containers using a multibuild flavor 2018-06-27 10:25:45 +02:00
jonsger
6bd8572cf7
Fix typo in "osc revert" help 2018-05-03 16:16:38 +02:00
bfcfddb0da fix some commands when used with / syntax between arguments 2018-04-27 14:41:08 +02:00
628f7e2cf5 - support "addcontainers" command 2018-04-27 09:16:13 +02:00
lethliel
eb2647fd4f fix order of options valdiation. Now -P and -p is
honored if given by user.
2018-04-18 16:04:06 +02:00
fba9af7eee add new options to diff command:
--unexpand for local diffs only (bsc#1089025)
--meta for diffing meta files
2018-04-11 08:01:45 +02:00
Marcus Huewe
5341f3aae5 Merge branch 'fix_dod_get_binaries' of https://github.com/lethliel/osc
Support dod binaries in core.get_binarylist.
2018-03-14 14:06:13 +01:00
lethliel
9b42897413 fix getbinaries with DOD binaries
getbinaries of dod binaries do not have a size or mtime.
This will break. So just set to None and print unkown instead.
2018-03-14 13:45:38 +01:00
Marcus Huewe
a25209ac31 Merge branch 'improve_created_binaries_msg' of https://github.com/lethliel/osc
Improve message that is printed during "osc getbinaries...".
2018-03-13 15:16:12 +01:00
lethliel
e042c585c0 change output when creating binaries directory
was:
Creating binaries

is now:
Creating directory "binaries"
2018-03-13 15:00:46 +01:00
Björn Geuken
030c2a41f8 Fix typo in example for osc search 2018-02-18 21:27:22 +01:00
Marcus Huewe
8948a26ae4 Fix --multibuild-package option handling in do_sendsysrq
Concatenating a str and a list does not work.
2018-02-09 15:35:52 +01:00
7fc251d81e fix sendsysrq command description 2018-02-09 10:08:13 +01:00
80352cbfc7 add sendsysrq command 2018-02-09 08:50:21 +01:00
Marcus Huewe
9c4f0d5d30 Ignore "--alternative-project <prj>" if it is equal to the wc's project
Without this change, using "--alternative-project <prj>" in combination
with "--multibuild-package <flavor>" yields to unexpected results (from
a user's point of view). Note that this may break existing (artificial)
workflows (e.g., using --alternative-project to ignore the package
meta's debuginfo flag), but these workflows should be rare and there
are options to achieve the same.

Fixes: #376 ("osc build -M something does not work with
--alternative-project")
2018-02-07 14:35:35 +01:00
Andreas Schwab
50222810f0 osc chroot: also mount devpts
This is needed for running expect, for example.
2018-01-28 16:53:52 +01:00
Marco Strigl
2405134cbf fixes not working osc maintainer <prj>
The retrun at this point breaks the call, because in most
cases <prj> is not a binary. And the code always checks for the
binary first and then returns if no binary with the name <prj>
is found.
2018-01-11 11:57:22 +01:00
Marcus Huewe
b1d6d8347b Fix "osc buildinfo --prefer-pkgs <dir>..." (finally!)
This is a follow-up commit for commit ce9a6d0 ("Fixed
\"osc buildinfo --prefer-pkgs...\"").
2017-12-06 18:04:30 +01:00
Marcus Huewe
9116d8ff97 Support expansion/unexpansion of a link when updating to certain rev
There is no good reason why "--revision <rev>" and "--expand-link" or
"--revision <rev>" and "--unexpand-link" should be mutually exclusive
during an "osc up" of a package wc.
Introduce the new "--linkrev <rev>" option to specify a rev of the link
target that is used during link expansion.
2017-12-03 16:45:36 +01:00
Marcus Huewe
5791d1bb5c Merge branch 'mount_sysfs' of https://github.com/lethliel/osc
Mount sysfs during "osc chroot". The current implementation
of "osc chroot" is a major pain for plain "su" users, because the
root password has to be entered several times - we should fix this.

Fixes: #354 ("Mount sysfs in chroot")
2017-11-21 12:34:15 +01:00
lethliel
00b6a9fe27 in chroot also mount /sys in addition to proc 2017-11-21 10:52:40 +01:00