[opensuse-buildservice] Mass-rejecting SRs
Hi, I'd like to do a mass rejection of some SRs submitted against a given project. However, I'm not sure how to isolate the SRs using osc. The output of osc my is not very friendly for scripting as the id and the name of the project + package are on different lines. Any suggestions of how to extract the SR ids based on project name + package name ( regexp ) would be very welcome. Thanks, Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Sunday 2016-10-09 14:09, Robert Munteanu wrote:
I'd like to do a mass rejection of some SRs submitted against a given project. However, I'm not sure how to isolate the SRs using osc.
The output of
osc my
is not very friendly for scripting as the id and the name of the project + package are on different lines.
(osc rq list project; osc rq list project/package) | grep -Po '^\d+' to get a start. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, On Sun, Oct 9, 2016 at 5:57 PM, Jan Engelhardt <jengelh@inai.de> wrote:
On Sunday 2016-10-09 14:09, Robert Munteanu wrote:
I'd like to do a mass rejection of some SRs submitted against a given project. However, I'm not sure how to isolate the SRs using osc.
The output of
osc my
is not very friendly for scripting as the id and the name of the project + package are on different lines.
(osc rq list project; osc rq list project/package) | grep -Po '^\d+'
to get a start.
Thanks. Turns out that there was only one request in 'osc my' which did not need to be rejected, so I saved the output of that command to a file and ran the following script, based on your grep command $ for sr in $(grep -Po '^\d+' < leap_srs); do echo "osc rq decline -m 'Mass decline for pear submissions Leap 42.2, as no maintainer has stepped up'" $sr; done Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Okt 09 2016, Robert Munteanu <robert.munteanu@gmail.com> wrote:
Any suggestions of how to extract the SR ids based on project name + package name ( regexp ) would be very welcome.
Try using the API directly with osc api. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Andreas Schwab
-
Jan Engelhardt
-
Robert Munteanu