1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-21 09:46:19 +02:00
Commit Graph

1509 Commits

Author SHA1 Message Date
Quang Tran
86fcb7aecf
Fix typo in help message 2020-01-08 17:18:54 +01:00
Marco Strigl
f0583c22c0
Merge pull request #713 from M0ses/fix_importsrcpkg
fix broken importsrcpkg for python3
2019-12-28 21:05:10 +01:00
lethliel
76793cc0ac fix regression in osc chroot
This fixes some regressions with osc chroot:

- osc chroot --wipe --root=/dir/ can now be called outside
  a working copy
- osc chroot --noinit --root=/dir/ can now be called outside
  a working copy and behaves like the old code (Just entering
  the chroot without any modifications)
- The confirmation of the deletion is implemented again and thus
  the --force option was implemented too.
2019-12-20 20:43:01 +01:00
Frank Schreiner
ae0b55de3b
fix broken importsrcpkg for python3
without this patch, `importsrcpkg` breaks with the following output:

```
  File "/usr/lib/python3.7/site-packages/osc/commandline.py", line 7868, in do_importsrcpkg
    createPackageDir(os.path.join(project.dir, pac), project)
  File "/usr/lib64/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib64/python3.7/genericpath.py", line 151, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
```

Fixes #712
2019-12-20 08:36:08 +01:00
lethliel
ade9baba52 fix lastbuildroot on builds not in WC
fix the lastbuildroot handling if the package is being build oustide of
a package directory and thus no .osc/ dir can be found.

We then just skip the store_write_last_buildroot and store_read_last_buildroot
calls.
2019-12-09 14:07:48 +01:00
Marco Strigl
8ec18e99a3
Merge pull request #694 from adrianschroeter/vm_build_fixes
VM build fixes
2019-12-05 10:26:40 +01:00
b329b74816 build environement parameter caching
repository, architecture and vm_type from last build is automatically
reused if not specified otherwise.
2019-12-04 15:16:54 +01:00
47e346dde8 avoid source service run for "osc shell"
this also drops the warning line if service disabled. It seems not
to be important enough to me.
2019-12-04 14:50:15 +01:00
eb7aab1cf7 osc build --vm-disk-size= switch support 2019-12-04 14:50:15 +01:00
a628ea8cca read debug packages from server side project configuration
=> avoids unresolvable errors when distro is not providing the
    extra/debug package
2019-12-04 08:41:46 +01:00
Marco Strigl
8bebc13675
Merge pull request #678 from adrianschroeter/lastsucceeded
add --lastsucceeded option for logfile display
2019-12-04 08:36:30 +01:00
19168f4bb1
Merge pull request #690 from andreas-schwab/master
Doc fix
2019-12-03 17:30:24 +01:00
1f89b5a538 add --lastsucceeded option for logfile display
no single option since it is really a special usecase IMHO
jsc#OBS-40
2019-12-03 17:29:59 +01:00
33747d12a2 do not running local source service with "osc shell" 2019-12-02 14:33:17 +01:00
e5788030bf add --login-as-root alias of old "osc chroot".
is doing the same as --userootforbuild now
2019-12-02 14:23:41 +01:00
Andreas Schwab
5dfb80299c Doc fix 2019-12-02 13:12:59 +01:00
2286f042ef improve help text for for build/shell/wipe 2019-11-28 10:21:05 +01:00
b78a0b3896 osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm) 2019-11-28 10:07:11 +01:00
lethliel
c32ec4bc1c appent opts.file to args not cmd_list
prepend to args instead to cmd_list. Otherwise the
changes file will be written into the given --file

osc vc --file=proposed.changes package.changes
2019-11-13 09:50:05 +01:00
lethliel
af6d0bc652 osc ci improve error message on fail
The error message if the call of _commit is just:
"ERROR: service run failed"

One option why this can fail is that the user Editor in env('EDITOR')
is not present.

We check now if e.msg gives a hint about "not found file" and then
error out with a better error message
2019-10-23 14:12:03 +02:00
Marco Strigl
6f34f2b8d8
Merge pull request #651 from lethliel/implement_incoming_option_for_rq
implement incoming option for osc rq
2019-10-22 13:15:17 +02:00
lethliel
b556095502 implement incoming option for osc rq
There is a config option 'include_request_from_project' which
can be set to 0 to exclude all requests originating from the
project in osc [rq|review] list.

To force this behaviour just once (without always editing oscrc
the '--incoming' option can be used.
2019-10-22 10:20:15 +02:00
Ludwig Nussel
e53d16f5d8 New browse command to quickly open web browser 2019-10-22 09:16:57 +02:00
Marcus Huewe
5611c55bde Merge branch 'fix_buildinfo_with_alternative_project' of https://github.com/lethliel/osc
Make "osc buildinfo --alternative-project <project> ..." consistent with
"osc build --alternative-project <project> ...". This change breaks some
invocations where a build_descr is omitted (but in this case, simply
use "osc buildinfo <project> <package> <repo> <arch>).
2019-10-21 16:16:55 +02:00
Marcus Huewe
3025dbf954 Merge branch 'support_appimage_yml' of https://github.com/adrianschroeter/osc
Support "appimage.yml" in parse_repoarchdescr.
2019-10-21 16:06:29 +02:00
lethliel
333028401e use _repository if alt prj is used
Use _repository as package name if alternative_project is used
2019-10-21 13:29:37 +02:00
e43d0641c6 find appimage.yml files as build description 2019-10-17 08:07:38 +02:00
lethliel
aaa51bcab1 improve help text for osc maintained
The help text does not indicate that only osc mbranch
really creates a branch.

osc maintained and osc sm are just aliases for osc mbranch --dryrun
2019-10-16 14:41:22 +02:00
lethliel
edc2bde460 Transfer the name of the input file to vc
instead of the content and let vc do the rest.
This prevents calling echo -e and interpreting
escape characters.
2019-09-25 11:36:25 +02:00
Marcus Huewe
5756e90b90 Merge branch 'fix_decoding_in_osc_cat' of https://github.com/lethliel/osc
Do not perform any decoding in do_cat.
2019-09-18 16:36:00 +02:00
lethliel
6f674a6289 do not decode diff before passing it to run_pager
run_pager will take care of the bytes-like object and
will directly write it to sys.stdout.buffer.write() or
NamedTemporaryFile.
2019-09-18 11:26:16 +02:00
lethliel
d1d45f4618 fix decoding for osc cat
use sys.stdout.buffer.write() to print encoded data
correctly
2019-09-18 10:49:39 +02:00
Marco Strigl
1e4e7edad5
Merge pull request #446 from lethliel/add_error_for_issue_445
print error and exit if p.apiurl != -A <apiurl> using osc sr
2019-09-17 14:11:20 +02:00
Marco Strigl
035457cc26
Merge pull request #630 from lethliel/fix_decoding_on_lbl
decode data on osc lbl
2019-09-12 12:27:42 +02:00
lethliel
ee64437521 decode data on osc lbl 2019-09-12 10:41:26 +02:00
Mike Gorse
ef1c605a32 Initialize diff as bytes
Otherwise, python 3 will throw a traceback if the fallback code is
triggered, since it appends bytes.
2019-09-11 10:05:32 -05:00
Marcus Huewe
749f994465 Merge branch 'simplify_sr_on_prj_level' of https://github.com/lethliel/osc
Simplify the project sr handling in do_submitrequest a bit. It also fixes
a bug in case a target project and --separate-request is specified.
Other bugs are retained for now (for instance, --update-link is ignored).
2019-08-30 10:52:52 +02:00
lethliel
3da7b9b3d8 simplify osc sr code in submitting prj
Most of the stuff is now done in the API.
For just submitting all in one request the following is sufficient:

<action type="submit"> <source project="%s" /> %s </action>

If a target project is given it looks like this:

<action type="submit"> <source project="%s" /> <target project="%s"> %s </action>

We don't need package name or source package and targets anymore.
This is all handled by the API now.

For the --seperate-requests case the check for the entries in the linkinfo
is not working on most cases. So we handle this in the do_submitrequest
and skip the package if X-Opensuse-Errorcode is missing_action which means
basically nothing to do for this package

redesign target_project handling
2019-08-30 10:42:08 +02:00
lethliel
74c70620b7 Add project parameter to print_repos
This is needed if the project differs from the current
working copy.

Fixes https://github.com/openSUSE/osc/issues/623
2019-08-30 10:32:02 +02:00
Marcus Huewe
e7397221b3 Add --change-password example to the help text of do_config
This should have been part of commit
cba4b58bbe ("Improve password
handling").
2019-08-29 16:42:09 +02:00
lethliel
cba4b58bbe Improve password handling
* Adapt do_config to use the new credentials manager implementation
  and add a --change-password option which can be used to change the
  password.
* Adapt config_set_option to follow the change in do_config.
* Split selection of the credentials manager descriptor to reuse it
  in do_config and interactive_config_setup.
* Introduce new ConfigMissingCredentialsError which is raised in case
  of missing credentials (user or password). In this case the user will
  be asked to enter the new credentials.
2019-08-29 16:11:17 +02:00
lethliel
428a81e451 Refactor config setup dialog
Move logic to conf module in new function interactive_config_setup
for new config file and missing apiurl section.

Dropped keyring code, because it was never used in write_initial_config()
2019-08-26 17:25:56 +02:00
Marcus Huewe
63c103770a Merge branch 'fix_600_osc-h_not_working_with_plugins' of https://github.com/lethliel/osc
python3 "workaround" for the quite fragile code in
RawCmdln._help_preprocess: It depends on the "non-deterministic" order
of preprocessor.items(). Hence, the results may differ on python2 and
python3. The real fix is probably to enforce a fixed iteration order.
See also the discussion in [1].

[1] https://github.com/openSUSE/osc/pull/604
2019-08-03 16:20:01 +02:00
lethliel
c78c8178e6 prevent plugins to break help
prevent call of preprocessor if ${cmd_name} marker is accidentaly set,
but cmdname is None.

Also for cmd_option_list and cmd_usage
overwrite _help_preprocess_* functions in Osc class
2019-08-02 20:02:14 +02:00
Marcus Huewe
6e95f8019d Merge branch 'fix_#607' of https://github.com/lethliel/osc
Do not apply the --target-package-filter pattern if there is no target
package.
2019-08-02 13:31:53 +02:00
Marco Strigl
d2de7ccc97
Merge branch 'master' into maint_enforce_branch 2019-07-25 13:46:18 +02:00
f465717668 allow implicit branch on maintenance request creation
via --enforce-branching option

This may be default by server side settings
2019-07-25 13:43:45 +02:00
Marcus Huewe
71ae93b35a Merge branch 'switch_diffs_to_bytes' of https://github.com/lethliel/osc
Since we do not know the files' encoding, the diff functions/methods
have to return bytes. Note: decoding the diff result is wrong in
general (see the discussion in [1]).

[1] https://github.com/openSUSE/osc/pull/554
2019-07-24 14:45:23 +02:00
lethliel
2b47be6b1e switch to difflib.diff_bytes in python3 case.
The files are now opened as rb for diffing. In python2 nothing changes.
In python3 the returned diff is bytes now.

The following changes were made:
  * commandline.py: The returned diff is now bytes
  * get_diff now returs the diff as a bytes-like object
  * run_pager writes with sys.stdout.buffer.write if message
    is not a string
  * for the commit message the returned diff needs to be decoded
    now. Otherwise it will just producce garbage. For the commit
    message the diff on decoded bytes-objects is ok. (nothing harmfull
    can happen here)
  * fixed submit_action_diff
  * fixed request_interactive_review
2019-07-24 13:48:39 +02:00
lethliel
0c0dca0b27 Fix package filtering for osc rq
Check if action.tgt_package is None.
2019-07-23 15:51:41 +02:00