From 89e58b51057b965a4f554b0aa1ff81cbd9439655 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 6 Mar 2015 00:23:05 +0100 Subject: [PATCH] patchupdate.py: Add back code to query wine bugzilla, show upstream bug status during patch updater step. --- README.md | 7 ++- debian/tools/patchupdate.py | 57 ++++++++++++++++++- .../definition | 2 +- patches/patchinstall.sh | 3 +- patches/server-Stored_ACLs/definition | 1 - 5 files changed, 60 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2cadf67f..ab7b0964 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [16]:** +**Bugfixes and features included in the next upcoming release [17]:** * Add stub for gdiplus.GdipCreateEffect ([Wine Bug #32163](https://bugs.winehq.org/show_bug.cgi?id=32163)) * Add support for CopyFileEx progress callback ([Wine Bug #22692](https://bugs.winehq.org/show_bug.cgi?id=22692)) @@ -55,6 +55,7 @@ Included bug fixes and improvements * Increase wineconsole commandline buffer size ([Wine Bug #34814](https://bugs.winehq.org/show_bug.cgi?id=34814)) * Process Hacker 2.x needs ntoskrnl.ProbeForRead ([Wine Bug #38103](https://bugs.winehq.org/show_bug.cgi?id=38103)) * Properly track handle count of wineserver objects +* Support for GetFinalPathNameByHandle ([Wine Bug #34851](https://bugs.winehq.org/show_bug.cgi?id=34851)) * Support for shell32 file operation progress dialog @@ -186,7 +187,7 @@ Included bug fixes and improvements * Scrolling causes mouse and screen to lock in Call to Power II ([Wine Bug #34559](https://bugs.winehq.org/show_bug.cgi?id=34559)) * Send WM_PAINT event during dialog creation ([Wine Bug #35652](https://bugs.winehq.org/show_bug.cgi?id=35652)) * Set last error when GetRawInputDeviceList fails ([Wine Bug #37667](https://bugs.winehq.org/show_bug.cgi?id=37667)) -* Silverlight needs support for file ACLs ([Wine Bug #31858](https://bugs.winehq.org/show_bug.cgi?id=31858)) +* ~~Silverlight needs support for file ACLs~~ ([Wine Bug #31858](https://bugs.winehq.org/show_bug.cgi?id=31858)) * Super Mario 3: Mario Forever fails to load keyboard mapping from profile files. ([Wine Bug #18099](https://bugs.winehq.org/show_bug.cgi?id=18099)) * Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](https://bugs.winehq.org/show_bug.cgi?id=34372)) * Support for BindImageEx ([Wine Bug #3591](https://bugs.winehq.org/show_bug.cgi?id=3591)) @@ -198,7 +199,7 @@ Included bug fixes and improvements * Support for DOS hidden/system file attributes ([Wine Bug #9158](https://bugs.winehq.org/show_bug.cgi?id=9158)) * Support for Dynamic DST (daylight saving time) information in registry * Support for GdipCreateRegionRgnData ([Wine Bug #34843](https://bugs.winehq.org/show_bug.cgi?id=34843)) -* Support for GetFinalPathNameByHandle ([Wine Bug #36073](https://bugs.winehq.org/show_bug.cgi?id=36073)) +* ~~Support for GetFinalPathNameByHandle~~ ([Wine Bug #36073](https://bugs.winehq.org/show_bug.cgi?id=36073)) * Support for GetSystemTimes ([Wine Bug #19813](https://bugs.winehq.org/show_bug.cgi?id=19813)) * Support for GetVolumePathName * Support for H264 DXVA2 GPU video decoding through vaapi diff --git a/debian/tools/patchupdate.py b/debian/tools/patchupdate.py index 8dc1cf76..63402762 100755 --- a/debian/tools/patchupdate.py +++ b/debian/tools/patchupdate.py @@ -21,6 +21,7 @@ import binascii import cPickle as pickle +import contextlib import fnmatch import hashlib import itertools @@ -36,6 +37,8 @@ import subprocess import sys import tempfile import textwrap +import urllib +import xml.dom.minidom _devnull = open(os.devnull, 'wb') @@ -135,6 +138,34 @@ def _parse_int(val, default=0): except AttributeError: return default +def _winebugs_query(bugids): + """Query short_desc from multiple wine bugzilla bugs at the same time.""" + bugids = list(set(bugids)) # Remove duplicates and convert to fixed order + if len(bugids) == 0: return {} + + # Query bugzilla + url = "http://bugs.winehq.org/show_bug.cgi?%s&ctype=xml&field=short_desc&field=bug_status&field=resolution" % \ + "&".join(["id=%d" % bugid for bugid in bugids]) + with contextlib.closing(urllib.urlopen(url)) as fp: + data = xml.dom.minidom.parseString(fp.read()) + + # convert xml in a dictionary containing all bugs we found + result = {} + for element in data.getElementsByTagName('bug_id'): + bugids.remove(int(element.firstChild.data)) + + def _get_text(n): + return n.firstChild.data if (n and n.firstChild) else None + + for bugid, element in zip(bugids, data.getElementsByTagName('bug')): + if element.getElementsByTagName('bug_id'): continue + result[bugid] = { + 'short_desc': _get_text(element.getElementsByTagName('short_desc')[0]), + 'bug_status': _get_text(element.getElementsByTagName('bug_status')[0]), + 'resolution': _get_text(element.getElementsByTagName('resolution')[0]) } + + return result + def _read_changelog(): """Read information from changelog.""" with open(config.path_changelog) as fp: @@ -195,6 +226,7 @@ def read_patchset(revision = None): unique_id = itertools.count() all_patches = {} name_to_id = {} + all_bugids = set() # Read in sorted order (to ensure created Makefile doesn't change too much) for name, directory in sorted(enum_directories(revision, config.path_patches)): @@ -262,11 +294,15 @@ def read_patchset(revision = None): elif key == "fixes": r = re.match("^[0-9]+$", val) if r: - patch.fixes.append((int(val), None)) + bugid = int(val) + patch.fixes.append((bugid, None)) + all_bugids.add(bugid) continue r = re.match("^\\[ *([0-9]+) *\\](.*)$", val) if r: - patch.fixes.append((int(r.group(1)), r.group(2).strip())) + bugid = int(r.group(1)) + patch.fixes.append((bugid, r.group(2).strip())) + all_bugids.add(bugid) continue patch.fixes.append((None, val)) @@ -279,6 +315,21 @@ def read_patchset(revision = None): elif revision is None: print "WARNING: Ignoring unknown command in definition file %s: %s" % (filename, line) + # 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", "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): @@ -594,7 +645,7 @@ def generate_markdown(all_patches, stable_patches, stable_compholio_version): return "* %s ([Wine Bug #%d](https://bugs.winehq.org/show_bug.cgi?id=%d))" % \ (bugname, bugid, bugid) #, short_desc.replace("\\", "\\\\").replace("\"", "\\\"")) - all_fixes = {} + all_fixes = {} # Get fixes for current version for _, patch in all_patches.iteritems(): diff --git a/patches/kernel32-GetFinalPathNameByHandle/definition b/patches/kernel32-GetFinalPathNameByHandle/definition index e16c773e..79282779 100644 --- a/patches/kernel32-GetFinalPathNameByHandle/definition +++ b/patches/kernel32-GetFinalPathNameByHandle/definition @@ -1 +1 @@ -Fixes: [36073] Support for GetFinalPathNameByHandle +Fixes: [34851] Support for GetFinalPathNameByHandle diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7546ac7e..a790820b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -2345,7 +2345,7 @@ fi # Patchset kernel32-GetFinalPathNameByHandle # | # | This patchset fixes the following Wine bugs: -# | * [#36073] Support for GetFinalPathNameByHandle +# | * [#34851] Support for GetFinalPathNameByHandle # | # | Modified files: # | * dlls/api-ms-win-core-file-l1-2-0/api-ms-win-core-file-l1-2-0.spec, dlls/kernel32/file.c, dlls/kernel32/kernel32.spec, @@ -3330,7 +3330,6 @@ fi # Patchset server-Stored_ACLs # | # | This patchset fixes the following Wine bugs: -# | * [#31858] Silverlight needs support for file ACLs # | * [#33576] Support for stored file ACLs # | # | Modified files: diff --git a/patches/server-Stored_ACLs/definition b/patches/server-Stored_ACLs/definition index 4a414998..87d44e21 100644 --- a/patches/server-Stored_ACLs/definition +++ b/patches/server-Stored_ACLs/definition @@ -1,3 +1,2 @@ Depends: ntdll-DOS_Attributes -Fixes: [31858] Silverlight needs support for file ACLs Fixes: [33576] Support for stored file ACLs