1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-13 08:24:31 +02:00
Commit Graph

1959 Commits

Author SHA1 Message Date
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
67f7625ee5 Fix crash in 'build' command due to undefined 'build_root' variable 2024-11-08 13:19:19 +01:00
8216118278 Update osc/commandline.py
Co-authored-by: Dirk Mueller <dmueller@suse.com>
2024-11-08 08:30:21 +01:00
8dff7f58d7 checkout: allow to checkout obs imported sources of scmsync sources
This allows to skip the check of obs-scm-bridge and checks out what
is stored in OBS src server.

Note: This is not necessarly the same representation as in git
      (.obscpio instead of directories or sub modules).
      Also no modification can be committed.
      So this is only intended for people who understand the current
      internal implementation of the source storage. There is no
      guarantee that this won't change.

Checkout of entire project git is not working with this switch, as
the packagelist of osc is empty. It may also make no sense to do
this as it will not perform for large projects.
2024-11-08 08:30:21 +01:00
Fabian Vogt
facdbf2306 Support the mkosi build type
Unlike other recipe files, OBS detects this by matching the prefix rather
than the suffix. As this would cause conflicts with e.g. mkosi.spec the
build type detection had to be changed a bit.
2024-11-05 15:48:01 +01:00
42b5113687 Print buildroot directory when build or chroot finishes
This used to be printed but was dropped with a refactoring.
Of course, there is the --just-print-buildroot option, but
there is no harm printing this information anyway.

Signed-off-by: Egbert Eich <eich@suse.com>
2024-11-05 14:20:15 +01:00
1d87e29c78 Merge pull request #1599 from dmach/gitea_api
Add 'gitea_api' module and 'git-obs' executable
2024-10-11 16:23:13 +02:00
70975fc5b8 Merge pull request #1639 from adrianschroeter/token_parameters
Support parameters on token triggers
2024-10-11 16:21:49 +02:00
7eddadf620 Merge pull request #1641 from dmach/fix-build-local-package-.osc
Fix crash in 'build' command when building with --local-package --alternative-project from a locally initialized .osc package
2024-10-11 16:21:23 +02:00
b0b8588e7c Fix crash in 'build' command when building with --local-package --alternative-project from a locally initialized .osc package 2024-10-11 14:52:45 +02:00
541b6da423 Improve git-obs startup time by loading less python modules 2024-10-11 13:13:26 +02:00
ff30efaa81 Change the help output to determine executable name from the command-line arguments 2024-10-11 13:13:26 +02:00
44767f26ff Support parameters on token triggers
Add missing parameters for token triggers. Esp used
for rebuild and release commands.
2024-10-11 10:35:49 +02:00
Björn Bidar
88d1d96632 Add --no-timestamps parameter to build
Add --no-timestamps parameter which already exists in build.
Help text copied from build.
Include parameters for the same parameter in buildlog for easier
use.
2024-10-09 03:23:34 +03:00
1fc581325f Merge pull request #1625 from adrianschroeter/copypac_scmsync
Support copy of scmsync packages
2024-10-02 14:28:32 +02:00
f0292dd2be Support copy of scmsync packages
There are two ways, either copy the scmsync definition or drop it
when creating a new package meta.

If we keep it, we must not ask OBS to copy sources, it is syncing it
anyway.

We could add another option to skip the scmsync tag copy, but we keep
it as default, because we don't want to give a different view of the
the sources to the user.  The client side copy is doing this.
2024-10-02 13:39:11 +02:00