Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 613156 Details for
Bug 708912
New 'establereq' tool to generate STABLEREQ URLs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
file_stablereq.py
file_stablereq.py (text/x-python), 2.48 KB, created by
Sergei Trofimovich (RETIRED)
on 2020-02-09 22:27:25 UTC
(
hide
)
Description:
file_stablereq.py
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2020-02-09 22:27:25 UTC
Size:
2.48 KB
patch
obsolete
>#!/usr/bin/env python > ># The script generates a simple stablereq template URL from pkgcheck output. ># It does a few things: ># 1. The "input" is provided into 'raw_pkgcheck_output' variable. ># It's a raw output of: ># $ portageq --no-regex --no-version --maintainer-email=slyfox@gentoo.org} --repo=gentoo | ># xargs --no-run-if-empty pkgcheck scan --repo=gentoo ># Usually raw output looks like: ># app-misc/golly ># StableRequest: version 3.3: slot(0) no change in 62 days for unstable keywords: [ ~amd64, ~x86 ] ># 2. Extract list of keywords for stabilization, get gentoo version of a package to stabilize ># 3. resolve package to maintainer list ># 4. Generate prefilled STABLEREQ URL > >from urllib.parse import urlencode >import re >import subprocess > >print("-----------------") ># try '-R FormatReporter --format=' here >raw_pkgcheck_output=""" >dev-vcs/cvsps > StableRequest: version 3.13-r2: slot(3) no change in 91 days for unstable keywords: [ ~amd64, ~arm, ~arm64, ~hppa, ~ia64, ~ppc, ~ppc64, ~s390, ~sparc, ~x86 ] >""".strip() >print(raw_pkgcheck_output) >print("-----------------") > >[pn, diag] = raw_pkgcheck_output.split('\n') >print(diag) >m = re.search(r'^StableRequest: version (.*): slot\((.*)\) no change in (.*) days for unstable keywords: \[ (.*) \]$', diag.strip()) > >[pv, slot, days, raw_arches] = m.group(1,2,3,4) >print([pv, slot, days, raw_arches]) >skip_chars = { > '~': ' ', > ',': ' ', >} >arches = raw_arches.translate(str.maketrans(skip_chars)).split() >maintainers = subprocess.check_output("equery m -m =%s-%s | tail -n +1" % (pn, pv), shell=True).decode('utf-8').strip().split() > ># TODO: some arches like prefix map to different email aliases >all_maintainers = maintainers + ["%s@gentoo.org" % a for a in arches] > >summary = '=%s-%s stabilization' % (pn, pv) >comment = ("In tree for %s days. Let's stabilize =%s-%s for:\n" % (days, pn, pv) + > " " + ' '.join(arches)) > >stabilization_atoms = ['%s-%s' % (pn, pv)] > >form = { > 'form_name': 'enter_bug', > 'product': 'Gentoo Linux', > 'component': 'Stabilization', > 'bug_status': 'CONFIRMED', > 'bug_severity': 'normal', > > 'short_desc': summary, > 'comment': comment, > 'keywords': 'STABLEREQ', > > 'assigned_to': all_maintainers[0], > 'cc': ','.join(all_maintainers[1:]), > 'cf_stabilisation_atoms': '\n'.join(stabilization_atoms), > > 'cf_runtime_testing_required': 'No', >} > >print(form) >print("-----------------") >print('https://bugs.gentoo.org/enter_bug.cgi?' + urlencode(form))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 708912
: 613156