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>
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>
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)
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)
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)
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)
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.
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>