Hello community,
here is the log from the commit of package openSUSE-release-tools for
openSUSE:Factory checked in at 2019-12-05 17:34:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools"
Thu Dec 5 17:34:25 2019 rev:256 rq:754090 version:20191204.fe8bfc2c
Changes:
--------
---
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
2019-12-04 14:20:19.926435709 +0100
+++
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.4691/openSUSE-release-tools.changes
2019-12-05 17:34:56.329443084 +0100
@@ -1,0 +2,14 @@
+Wed Dec 04 15:25:36 UTC 2019 - [email protected]
+
+- Update to version 20191204.fe8bfc2c:
+ * Align the announcer config with the template
+ * Remove SLE12SP5 pipelines
+ * Fix setprio command to use current API
+
+-------------------------------------------------------------------
+Wed Dec 04 12:30:06 UTC 2019 - [email protected]
+
+- Update to version 20191204.0c6f43f4:
+ * Reuse function of accept to check local links
+
+-------------------------------------------------------------------
Old:
----
openSUSE-release-tools-20191203.2b4d57b2.obscpio
New:
----
openSUSE-release-tools-20191204.fe8bfc2c.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.0795iO/_old 2019-12-05 17:34:58.501442776 +0100
+++ /var/tmp/diff_new_pack.0795iO/_new 2019-12-05 17:34:58.509442774 +0100
@@ -20,7 +20,7 @@
%define source_dir openSUSE-release-tools
%define announcer_filename factory-package-news
Name: openSUSE-release-tools
-Version: 20191203.2b4d57b2
+Version: 20191204.fe8bfc2c
Release: 0
Summary: Tools to aid in staging and release work for openSUSE/SUSE
License: GPL-2.0-or-later AND MIT
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.0795iO/_old 2019-12-05 17:34:58.549442769 +0100
+++ /var/tmp/diff_new_pack.0795iO/_new 2019-12-05 17:34:58.549442769 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
- <param
name="changesrevision">2b4d57b23c776e83b90ceff619f84dd948fb9383</param>
+ <param
name="changesrevision">fe8bfc2c1014fed04d63ffbb0b0713c10294c470</param>
</service>
</servicedata>
++++++ openSUSE-release-tools-20191203.2b4d57b2.obscpio ->
openSUSE-release-tools-20191204.fe8bfc2c.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/gocd/announcer.gocd.yaml
new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/announcer.gocd.yaml
--- old/openSUSE-release-tools-20191203.2b4d57b2/gocd/announcer.gocd.yaml
2019-12-03 16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/announcer.gocd.yaml
2019-12-04 16:24:23.000000000 +0100
@@ -18,7 +18,7 @@
- staging-bot
tasks:
- script: ./factory-package-news/announcer.py --config
config/announcer/openSUSE:Factory.yml --verbose --state-file
/home/go/config/announcer.yaml
- Announcer.FactoryARM:
+ Announcer.Factory_ARM:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
@@ -27,7 +27,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 0 * ? * *
+ spec: 0 1 * ? * *
only_on_changes: false
stages:
- Run:
@@ -45,7 +45,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 1 * ? * *
+ spec: 0 2 * ? * *
only_on_changes: false
stages:
- Run:
@@ -54,7 +54,7 @@
- staging-bot
tasks:
- script: ./factory-package-news/announcer.py --config
config/announcer/openSUSE:Kubic.yml --verbose --state-file
/home/go/config/announcer.yaml
- Announcer.KubicARM:
+ Announcer.Kubic_ARM:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
@@ -63,7 +63,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 1 * ? * *
+ spec: 0 3 * ? * *
only_on_changes: false
stages:
- Run:
@@ -81,7 +81,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 2 * ? * *
+ spec: 0 4 * ? * *
only_on_changes: false
stages:
- Run:
@@ -90,7 +90,7 @@
- staging-bot
tasks:
- script: ./factory-package-news/announcer.py --config
config/announcer/openSUSE:MicroOS.yml --verbose --state-file
/home/go/config/announcer.yaml
- Announcer.MicroOSARM:
+ Announcer.MicroOS_ARM:
group: openSUSE.Checkers
lock_behavior: unlockWhenFinished
environment_variables:
@@ -99,7 +99,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 2 * ? * *
+ spec: 0 5 * ? * *
only_on_changes: false
stages:
- Run:
@@ -117,7 +117,7 @@
script:
git: https://github.com/openSUSE/openSUSE-release-tools.git
timer:
- spec: 0 3 * ? * *
+ spec: 0 6 * ? * *
only_on_changes: false
stages:
- Run:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/gocd/announcer.gocd.yaml.erb
new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/announcer.gocd.yaml.erb
--- old/openSUSE-release-tools-20191203.2b4d57b2/gocd/announcer.gocd.yaml.erb
2019-12-03 16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/announcer.gocd.yaml.erb
2019-12-04 16:24:23.000000000 +0100
@@ -1,6 +1,6 @@
format_version: 3
pipelines:
-<% ['Factory', 'Kubic', 'MicroOS', 'Leap:15.2'].each_with_index do |project,
index| -%>
+<% ['Factory', 'Factory:ARM', 'Kubic', 'Kubic:ARM', 'MicroOS', 'MicroOS:ARM',
'Leap:15.2'].each_with_index do |project, index| -%>
<% name = project.gsub(':', '_') -%>
Announcer.<%= name %>:
group: openSUSE.Checkers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/gocd/checkers.suse.gocd.yaml
new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/checkers.suse.gocd.yaml
--- old/openSUSE-release-tools-20191203.2b4d57b2/gocd/checkers.suse.gocd.yaml
2019-12-03 16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/checkers.suse.gocd.yaml
2019-12-04 16:24:23.000000000 +0100
@@ -21,7 +21,7 @@
- staging-bot
tasks:
- script: ./check_tags_in_requests.py -A https://api.suse.de
--verbose --user=sle-changelog-checker --review=accept-onpass
--factory=openSUSE.org:openSUSE:Factory review
- SLE.Project.Only:
+ SLE15SP2.Project:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
timer:
@@ -42,32 +42,6 @@
- repo-checker
tasks:
- script: ./project-installcheck.py -A https://api.suse.de --debug
check --store SUSE:SLE-15-SP2:GA:Staging/dashboard --no-rebuild
SUSE:SLE-15-SP2:GA
- SLE_12_SP5:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: ./project-installcheck.py -A https://api.suse.de --debug
check --store SUSE:SLE-12-SP5:GA:Staging/dashboard --no-rebuild
SUSE:SLE-12-SP5:GA
- SLE.Leaper:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- timer:
- spec: 0 */5 * ? * *
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-leaper
- materials:
- git:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- stages:
- - Run:
- approval: manual
- jobs:
- Run:
- timeout: 30
- resources:
- - leaper
- tasks:
- - script: ./leaper.py -A https://api.suse.de --group=leaper
--user=leaper --verbose --manual-version-updates --manual-maintenance-updates
review
SLE.Origin.Manager:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
@@ -230,207 +204,6 @@
- staging-bot
tasks:
- script: ./legal-auto.py -A https://api.suse.de --debug --legaldb
http://legaldb.suse.de project $(cat /home/go/config/legal-auto-projects-suse)
- SLE12.SP5.InstallCheck.A:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:A_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s A
- SLE12.SP5.InstallCheck.B:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:B_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s B
- SLE12.SP5.InstallCheck.C:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:C_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s C
- SLE12.SP5.InstallCheck.D:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:D_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s D
- SLE12.SP5.InstallCheck.H:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:H_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s H
- SLE12.SP5.InstallCheck.S:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:S_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s S
- SLE12.SP5.InstallCheck.V:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:V_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s V
- SLE12.SP5.InstallCheck.Y:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:Y_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s Y
-
SLE15.SP1.QR:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/gocd/checkers.suse.gocd.yaml.erb
new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/checkers.suse.gocd.yaml.erb
---
old/openSUSE-release-tools-20191203.2b4d57b2/gocd/checkers.suse.gocd.yaml.erb
2019-12-03 16:48:07.000000000 +0100
+++
new/openSUSE-release-tools-20191204.fe8bfc2c/gocd/checkers.suse.gocd.yaml.erb
2019-12-04 16:24:23.000000000 +0100
@@ -21,7 +21,7 @@
- staging-bot
tasks:
- script: ./check_tags_in_requests.py -A https://api.suse.de
--verbose --user=sle-changelog-checker --review=accept-onpass
--factory=openSUSE.org:openSUSE:Factory review
- SLE.Project.Only:
+ SLE15SP2.Project:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
timer:
@@ -42,32 +42,6 @@
- repo-checker
tasks:
- script: ./project-installcheck.py -A https://api.suse.de --debug
check --store SUSE:SLE-15-SP2:GA:Staging/dashboard --no-rebuild
SUSE:SLE-15-SP2:GA
- SLE_12_SP5:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: ./project-installcheck.py -A https://api.suse.de --debug
check --store SUSE:SLE-12-SP5:GA:Staging/dashboard --no-rebuild
SUSE:SLE-12-SP5:GA
- SLE.Leaper:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- timer:
- spec: 0 */5 * ? * *
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-leaper
- materials:
- git:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- stages:
- - Run:
- approval: manual
- jobs:
- Run:
- timeout: 30
- resources:
- - leaper
- tasks:
- - script: ./leaper.py -A https://api.suse.de --group=leaper
--user=leaper --verbose --manual-version-updates --manual-maintenance-updates
review
SLE.Origin.Manager:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
@@ -230,33 +204,6 @@
- staging-bot
tasks:
- script: ./legal-auto.py -A https://api.suse.de --debug --legaldb
http://legaldb.suse.de project $(cat /home/go/config/legal-auto-projects-suse)
-<% %w(A B C D H S V Y).each do |letter| -%>
- SLE12.SP5.InstallCheck.<%= letter %>:
- group: SLE.Checkers
- lock_behavior: unlockWhenFinished
- environment_variables:
- OSC_CONFIG: /home/go/config/oscrc-repo-checker
- materials:
- scripts:
- git: https://github.com/openSUSE/openSUSE-release-tools.git
- destination: scripts
- whitelist:
- - DO_NOT_TRIGGER
- stagings:
- git: git://botmaster.suse.de/suse-repos.git
- destination: repos
- whitelist:
- - SUSE:SLE-12-SP5:GA:Staging:<%= letter %>_-_standard.yaml
- stages:
- - Run:
- timeout: 30
- resources:
- - repo-checker
- tasks:
- - script: |-
- cd scripts
- ./staging-installcheck.py -d -p SUSE:SLE-12-SP5:GA -A
https://api.suse.de -s <%= letter %>
-<% end %>
SLE15.SP1.QR:
group: SLE.Checkers
lock_behavior: unlockWhenFinished
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/osc-staging.py
new/openSUSE-release-tools-20191204.fe8bfc2c/osc-staging.py
--- old/openSUSE-release-tools-20191203.2b4d57b2/osc-staging.py 2019-12-03
16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/osc-staging.py 2019-12-04
16:24:23.000000000 +0100
@@ -66,7 +66,7 @@
def lock_needed(cmd, opts):
return not(
- cmd in ('check', 'check_duplicate_binaries', 'frozenage', 'rebuild',
'unlock') or
+ cmd in ('check', 'check_duplicate_binaries', 'check_local_links',
'frozenage', 'rebuild', 'unlock', 'setprio') or
(cmd == 'list' and not opts.supersede)
)
@@ -137,6 +137,8 @@
"check" will check if all packages are links without changes
+ "check_local_links" lists local links that don't match multispec package
+
"check_duplicate_binaries" list binaries provided by multiple packages
"cleanup_rings" will try to cleanup rings content and print
@@ -297,6 +299,7 @@
osc staging adi [--move] [--by-develproject] [--split] [REQUEST...]
osc staging check [STAGING...]
osc staging check_duplicate_binaries
+ osc staging check_local_links
osc staging cleanup_rings
osc staging freeze [--no-bootstrap] STAGING...
osc staging frozenage [STAGING...]
@@ -335,17 +338,18 @@
'unselect',
'rebuild',
'repair',
- 'setprio',
'supersede',
):
min_args, max_args = 0, None
elif cmd in (
'freeze',
+ 'setprio',
'ignore',
):
min_args, max_args = 1, None
elif cmd in (
'check_duplicate_binaries',
+ 'check_local_links',
'cleanup_rings',
'list',
'lock',
@@ -405,6 +409,8 @@
print()
elif cmd == 'check_duplicate_binaries':
CheckDuplicateBinariesCommand(api).perform(opts.save)
+ elif cmd == 'check_local_links':
+ AcceptCommand(api).check_local_links()
elif cmd == 'freeze':
for prj in args[1:]:
prj = api.prj_from_short(prj)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/osclib/accept_command.py
new/openSUSE-release-tools-20191204.fe8bfc2c/osclib/accept_command.py
--- old/openSUSE-release-tools-20191203.2b4d57b2/osclib/accept_command.py
2019-12-03 16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/osclib/accept_command.py
2019-12-04 16:24:23.000000000 +0100
@@ -8,7 +8,7 @@
from osc.core import change_request_state, show_package_meta, wipebinaries
from osc.core import http_GET, http_PUT, http_DELETE, http_POST
-from osc.core import delete_package, search
+from osc.core import delete_package, search, meta_get_packagelist
from osc.core import Request
from osc.util.helper import decode_it
from osclib.core import attribute_value_save
@@ -146,7 +146,11 @@
return
- def fix_linking_packages(self, package):
+ def check_local_links(self):
+ for package in meta_get_packagelist(self.api.apiurl, self.api.project):
+ self.fix_linking_packages(package, True)
+
+ def fix_linking_packages(self, package, dry=False):
project = self.api.project
file_list = self.api.get_filelist_for_package(package, project)
# ignore
@@ -164,6 +168,8 @@
# Deleting all the packages that no longer have a .spec file
for link in local_links - needed_links:
print(f"Deleting package {project}/{link}")
+ if dry:
+ continue
try:
delete_package(self.api.apiurl, project, link, msg=f"No longer
linking to {package}")
except HTTPError as err:
@@ -182,6 +188,8 @@
# There is more than one .spec file in the package; link package
containers as needed
meta = ET.fromstring(source_file_load(self.api.apiurl, project,
package, '_meta'))
print(f"Creating new link {link}->{package}")
+ if dry:
+ continue
meta.attrib['name'] = link
bcnt = meta.find('bcntsynctag')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/openSUSE-release-tools-20191203.2b4d57b2/osclib/prio_command.py
new/openSUSE-release-tools-20191204.fe8bfc2c/osclib/prio_command.py
--- old/openSUSE-release-tools-20191203.2b4d57b2/osclib/prio_command.py
2019-12-03 16:48:07.000000000 +0100
+++ new/openSUSE-release-tools-20191204.fe8bfc2c/osclib/prio_command.py
2019-12-04 16:24:23.000000000 +0100
@@ -1,59 +1,44 @@
-from __future__ import print_function
-
import json
import osc
-try:
- from urllib.error import HTTPError
-except ImportError:
- # python 2.x
- from urllib2 import HTTPError
+from lxml import etree as ET
+from urllib.error import HTTPError
class PrioCommand(object):
def __init__(self, api):
self.api = api
- def _setprio(self, project, priority):
+ def _setprio(self, status, priority):
"""
Set prios for requests that are still in review
:param project: project to check
"""
-
- # XXX taking name verbatim would produce null byte error
- # https://github.com/openSUSE/open-build-service/issues/2493
- message = 'raising priority for %s' % str(project['name'])
- for r in project['missing_reviews']:
- reqid = str(r['request'])
+ message = 'raising priority for %s' % status.get('name')
+ for r in status.findall('missing_reviews/review'):
+ reqid = r.get('request')
req = osc.core.get_request(self.api.apiurl, reqid)
- if req.priority != priority:
- query = { 'cmd': 'setpriority', 'priority': priority }
- url = osc.core.makeurl(self.api.apiurl, ['request', reqid],
query)
- print(reqid + ' ' + message)
- try:
- osc.core.http_POST(url, data=message)
- print(reqid + ' ' + r['by'] + ' ' + priority)
- except HTTPError as e:
- print(e)
+ if req.priority == priority:
+ continue
+ query = { 'cmd': 'setpriority', 'priority': priority }
+ url = osc.core.makeurl(self.api.apiurl, ['request', reqid], query)
+ print(f"raising priority of {r.get('package')}
[{r.get('request')}] to {priority}")
+ try:
+ osc.core.http_POST(url, data=message)
+ except HTTPError as e:
+ print(e)
- def perform(self, projects=None, priority=None):
+ def perform(self, projects, priority):
"""
Set priority on specific stagings or all of them at once
:param projects: projects on which to set priority, None for all
"""
-
- aggregate = False
- if not projects:
- aggregate = True
- projects = self.api.get_staging_projects()
-
if not priority:
priority = 'important'
for project in projects:
- info = self.api.project_status(project, aggregate)
- if not info['selected_requests']:
- continue
+ project = self.api.prj_from_short(project)
+ info = self.api.project_status(project, status=False)
self._setprio(info, priority)
return True
++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.0795iO/_old 2019-12-05 17:34:59.237442671 +0100
+++ /var/tmp/diff_new_pack.0795iO/_new 2019-12-05 17:34:59.237442671 +0100
@@ -1,5 +1,5 @@
name: openSUSE-release-tools
-version: 20191203.2b4d57b2
-mtime: 1575388087
-commit: 2b4d57b23c776e83b90ceff619f84dd948fb9383
+version: 20191204.fe8bfc2c
+mtime: 1575473063
+commit: fe8bfc2c1014fed04d63ffbb0b0713c10294c470