1
0
mirror of https://github.com/openSUSE/osc.git synced 2026-01-29 17:18:55 +01:00
Commit Graph

1974 Commits

Author SHA1 Message Date
0eb0fc5a9a Modify osc subcommands to error out if they don't work with git 2025-09-23 13:28:26 +02:00
17d1113ab3 Update 'osc rq show' command to include history comments in verbose mode 2025-09-17 16:45:19 +02:00
975944ee8f Fix 'osc blt' command by checking if the working copy is a package 2025-08-26 15:45:49 +02:00
d3a3f94b8d Make buildlog work outside of osc package directory
With the git integration there may not always be a checked out package
available. With this change, `osc buildlog` supports to be called with
more than 2 arguments: in this, the first argument is interpreted as
the project, the 2nd as the package while the third denotes the repository
used. Arch may be specified as a 4th argument, if omitted, take the
host arch. This implements issue #1894.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-08-14 21:07:18 +02:00
92dfa1c6d7 Remove 'osc.commandline.Osc.post_argparse()' because it's no longer used 2025-07-31 13:31:35 +02:00
985881c8b0 Simplify 'osc.commandline.Osc.get_api_url()' to return the value from 'self.options' 2025-07-31 11:34:52 +02:00
e08644ea4e Move code setting apiurl from store to 'osc.conf.get_config()' 2025-07-31 11:13:46 +02:00
321e9a6fdb CLI: update deprecated env var OSC_PACKAGECACHEDIR
OSC_PACKAGECACHEDIR was renamed to OSC_PACKAGE_CACHE_DIR with commit
848f5fe48f.
2025-07-28 09:29:14 +02:00
cd6bf3e206 Remove extra newline from store files
store_write_string already appends a newline, don't do it twice.
2025-07-25 17:00:42 +02:00
4f720463d7 Merge pull request #1868 from dezza/man-cache-typo
Fix --sccache help typo
2025-07-15 14:42:38 +02:00
Christoffer Aasted
46581baa61 Fix --sccache help typo 2025-07-15 14:17:26 +02:00
Christoffer Aasted
648267e37e Add --no-pager global option` 2025-07-15 14:16:47 +02:00
b9f5932fc2 Fix 'osc buildinfo' for git packages by handing the 'build_repositories' files by store objects 2025-07-15 12:03:36 +02:00
f2424c31f8 Make osc results --show-excluded work in a project context
The line, added in commit 8307a7063, almost 15 years ago seems
to be obsolete, now.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-07-09 19:37:14 +02:00
86b400195e Migrate subcommands from using Store() to get_store() that is git aware 2025-07-03 21:54:24 +02:00
ff44786b27 Extend _buildinfo file lookup to the current directory
Fixes 'osc lbl' for git based packages.
2025-06-13 15:56:18 +02:00
b84019b368 Migrate store_* functions to use get_store instead of the original code
That allows us to use both OBS SCM store and Git SCM store
2025-06-13 11:24:35 +02:00
2ab01d8e9a chore: run no_implicit_optional on the code base to make it PEP 484 compliant.
References: https://github.com/hauntsaninja/no_implicit_optional
2025-05-06 23:12:37 +02:00
914a04836f don't crash when API returns None as a description 2025-04-28 19:52:33 +02:00
9bbe39de53 Add osc service precommit, for use with git hook
and create a binary to call it directly
2025-04-07 09:06:00 +02:00
5c50d475ba Rename get_parser() functions to argparse_manpage_get_parser() to clarify their purpose 2025-04-03 20:55:57 +02:00
7a4cf1a8df Fix rendering help output by adding the complete docstring of the commands 2025-04-03 17:47:07 +02:00
6a50e07f3a When doing an mr from a working copy check for unchecked modifications
Maintenance requests may be done from a working copy of a package
to just update a single code stream at once.
In this situation, this working copy may have been used to implement
this change. Thus, like with submit requestes, check if the working
copy has local changes that have not been checked in and warn the
user about it. This should help to prevent resource-intensive accidents.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-03-31 08:17:39 +02:00
819153b703 Consolidate working copy modification check dialog into a function.
Signed-off-by: Egbert Eich <eich@suse.com>
2025-03-31 08:17:31 +02:00
532ab0c7f1 Fix crash in 'osc build --host'
PosixPath needed to be converted to string prior string concatenation
2025-03-25 08:32:12 +01:00
b86e70048a Merge pull request #1736 from AdamMajer/missing-separators
Add missing project_separator substitutions
2025-03-18 16:04:15 +01:00
96a4f5ecb2 Change 'osc whatdependson' command to take multiple '-M' options incl. wildcards 2025-03-17 20:55:03 +01:00
bdcee5b173 Use -A/--apiurl specified on the command-line even if running from a checkout 2025-03-17 13:54:06 +01:00
Adam Majer
193264f51e Add missing project_separator substitutions
Followup for c4c2d2a933
2025-03-11 14:42:23 +01:00
dcdf4cb3d9 Fix or silence remaining pylint errors
Fix these by adding a default empty assignment:

osc/commandline.py:3382:62: E0606: Possibly using variable 'filter_pattern' before assignment (possibly-used-before-assignment)
osc/commandline.py:6692:18: E0606: Possibly using variable 'msg' before assignment (possibly-used-before-assignment)
osc/core.py:2051:23: E0606: Possibly using variable 'file_changed' before assignment (possibly-used-before-assignment)

These could probably be fixed by making the code easier to follow. By
silencing them for now and making the CI pass, it is easier to not
regress.

osc/commandline.py:3269:55: E0601: Using variable 'incident' before assignment (used-before-assignment)
osc/commandline.py:3276:55: E0601: Using variable 'priority' before assignment (used-before-assignment)

This is pylint not understanding that the try is for catching this case
and only importing when available:

osc/conf.py:77:4: E0401: Unable to import 'keyring' (import-error)
2025-02-27 14:32:09 +01:00
b133604097 Fix possible use before assignment
Doing the assignment conditionally doesn't make sense here, so move it
outside the condition.

osc/commandline.py:8311:15: E0606: Possibly using variable 'p' before assignment (possibly-used-before-assignment)
2025-02-26 18:49:56 +01:00
9e1e05e1a6 Add type annotation to appease pylint
This always throws an exception, so anntotating it NoReturn allows
pylint to notice some exhaustive choice, removing this false errors:

osc/commandline.py:6581:78: E0606: Possibly using variable 'arch' before assignment (possibly-used-before-assignment)
2025-02-26 18:49:53 +01:00
7a153ee28c Remove tautological condition to appease pylint
The exception above would have already triggered otherwise. Thus
removing this pylint error:

osc/commandline.py:4371:38: E0601: Using variable 'package' before assignment (used-before-assignment)
2025-02-26 18:35:02 +01:00
5f4a4704da Fix 'osc checkout' command to support deleted packages incl. revisions 2025-02-21 13:29:22 +01:00
3b328c0501 Merge pull request #1709 from andreas-schwab/master
Fix missing spaces in help string
2025-02-18 14:34:21 +01:00
ef6f8fb4f3 Fix missing spaces in help string 2025-02-17 15:29:43 +01:00
Atri Bhattacharya
e5c4a4407e rpmlint: help msg for invoking command in PKG dir. 2025-02-17 16:25:22 +05:30
Atri Bhattacharya
39bc4b9a78 rpmlint: Add --multibuild-package option.
Allow passing `--multibuild-package` or `-M` to the rpmlint command to
specify flavors for a multibuild package. This makes it consistent with
other commands, for example `buildlog`, where this option is similarly
used.
2025-02-17 16:25:03 +05:30
7b15faf53d Merge pull request #1705 from dmach/fix-git-project-local-build
Improve detecting git packages, use .osc metadata from project in parent directory
2025-02-13 14:50:56 +01:00
80b54b1499 Improve 'maintenancerequest' command to inherit description from superseded request
Commit 083fdf3b introduced a feature for the 'submitrequest' command
where the submission description is pre-populated with one of a superseded
request.
Here, the same is introduced for the `maintenancerequest` command.
The behavior of `osc mr -s 1234` is identical to `osc sr -s 1234` - see Issue 1575.

Signed-off-by: Egbert Eich <eich@suse.com>
2025-02-13 13:39:26 +01:00
96c5a1491c Fix retrieving apiurl from git repositories in get_api_url() in the command-line code 2025-02-13 13:08:34 +01:00
0bf2ef0c54 Fix command descriptions in help by moving the import statements under docstring in the do_*() methods 2025-01-08 09:10:59 +01:00
93a851b41c Merge pull request #1682 from dmach/xml-etree-extend-ParseError
Extend xml.etree.ElementTree.ParseError output with a snippet of broken XML
2025-01-07 13:08:02 +01:00
eecab6e798 Convert remaining makeurl() query parameters from deprecated string to dict 2025-01-06 17:06:41 +01:00
6fc5654aca Extend xml.etree.ElementTree.ParseError output with a snippet of broken XML 2025-01-02 14:25:23 +01:00
a20f2240a3 Merge pull request #1662 from dmach/osc-status-show-unmodified-help
Document that 'status' command prints unmodified files in verbose output
2024-11-29 16:47:08 +01:00
a6db8ad25c Fix local building in git projects
osc did not find it's store and was unable to run a local build
in a project git
2024-11-29 16:36:48 +01:00
6d91083413 Move running obs_scm_bridge into run_obs_scm_bridge() function 2024-11-29 16:36:48 +01:00
7ed288b838 Load most of the modules in commandline.py on-demand 2024-11-26 15:38:22 +01:00
aaa0332782 Document that 'status' command prints unmodified files in verbose output 2024-11-12 09:05:00 +01:00