mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchupdate.py: Move bug status check to a separate function.
This commit is contained in:
parent
e5d2ae6b87
commit
31e4657a83
42
debian/tools/patchupdate.py
vendored
42
debian/tools/patchupdate.py
vendored
@ -235,7 +235,6 @@ def read_patchset(revision = None):
|
||||
unique_id = itertools.count()
|
||||
all_patches = {}
|
||||
name_to_id = {}
|
||||
all_bugids = set()
|
||||
categories = {}
|
||||
|
||||
# Read in sorted order (to ensure created Makefile doesn't change too much)
|
||||
@ -317,13 +316,11 @@ def read_patchset(revision = None):
|
||||
if r:
|
||||
bugid = int(val)
|
||||
patch.fixes.append((bugid, None))
|
||||
all_bugids.add(bugid)
|
||||
continue
|
||||
r = re.match("^\\[ *([0-9]+) *\\](.*)$", val)
|
||||
if r:
|
||||
bugid = int(r.group(1))
|
||||
patch.fixes.append((bugid, r.group(2).strip()))
|
||||
all_bugids.add(bugid)
|
||||
continue
|
||||
patch.fixes.append((None, val))
|
||||
|
||||
@ -354,21 +351,6 @@ def read_patchset(revision = None):
|
||||
all_patches[i] = patch
|
||||
name_to_id[name] = i
|
||||
|
||||
# To simplify the task of keeping the bug list up-to-date, list all bugs
|
||||
# which might require attention.
|
||||
if revision is None:
|
||||
once = True
|
||||
for bugid, bug in sorted(_winebugs_query(all_bugids).items()):
|
||||
if bug['bug_status'] not in ["UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED"]:
|
||||
if once:
|
||||
print ""
|
||||
print "WARNING: The following bugs might require attention:"
|
||||
print ""
|
||||
once = False
|
||||
print " #%d - \"%s\" - %s %s" % (bugid, bug['short_desc'], bug['bug_status'],
|
||||
bug['resolution'] if bug['resolution'] else "")
|
||||
print ""
|
||||
|
||||
return all_patches
|
||||
|
||||
def causal_time_combine(a, b):
|
||||
@ -471,6 +453,26 @@ def resolve_dependencies(all_patches, index = None, depends = None, auto_deps =
|
||||
_resolve(depends)
|
||||
return resolved
|
||||
|
||||
def check_bug_status(all_patches):
|
||||
all_bugids = set()
|
||||
|
||||
for _, patch in all_patches.iteritems():
|
||||
for bugid, bugname in patch.fixes:
|
||||
if bugid is not None:
|
||||
all_bugids.add(bugid)
|
||||
|
||||
once = True
|
||||
for bugid, bug in sorted(_winebugs_query(all_bugids).items()):
|
||||
if bug['bug_status'] not in ["UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED"]:
|
||||
if once:
|
||||
print ""
|
||||
print "WARNING: The following bugs might require attention:"
|
||||
print ""
|
||||
once = False
|
||||
print " #%d - \"%s\" - %s %s" % (bugid, bug['short_desc'], bug['bug_status'],
|
||||
bug['resolution'] if bug['resolution'] else "")
|
||||
print ""
|
||||
|
||||
def generate_ifdefined(all_patches, skip_checks=False):
|
||||
"""Update autogenerated ifdefined patches, which can be used to selectively disable features at compile time."""
|
||||
enabled_patches = dict([(i, patch) for i, patch in all_patches.iteritems() if not patch.disabled])
|
||||
@ -889,6 +891,10 @@ if __name__ == "__main__":
|
||||
all_patches = read_patchset()
|
||||
stable_patches = read_patchset(revision="v%s" % latest_staging_version)
|
||||
|
||||
# Check bugzilla
|
||||
check_bug_status(all_patches)
|
||||
|
||||
# Update autogenerated files
|
||||
generate_ifdefined(all_patches, skip_checks=args.skip_checks)
|
||||
generate_script(all_patches, skip_checks=args.skip_checks)
|
||||
generate_markdown(all_patches, stable_patches)
|
||||
|
Loading…
Reference in New Issue
Block a user