You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Make definition files optional, move revision numbers to corresponding .patch files.
This commit is contained in:
10
debian/tools/patchupdate.py
vendored
10
debian/tools/patchupdate.py
vendored
@@ -212,13 +212,7 @@ def read_definition(revision, filename, name_to_id):
|
||||
elif key == "disabled":
|
||||
disabled = parse_int(val)
|
||||
|
||||
elif key == "author" or \
|
||||
key == "subject" or \
|
||||
key == "title" or \
|
||||
key == "revision":
|
||||
pass
|
||||
|
||||
else:
|
||||
elif revision is None:
|
||||
print "WARNING: Ignoring unknown command in definition file %s: %s" % (filename, line)
|
||||
|
||||
return depends, fixes, disabled
|
||||
@@ -264,7 +258,7 @@ def read_patchset(revision = None):
|
||||
patch.depends, patch.fixes, patch.disabled = \
|
||||
read_definition(revision, os.path.join(config.path_patches, patch.name), name_to_id)
|
||||
except IOError:
|
||||
raise PatchUpdaterError("Missing definition file for %s" % patch.name)
|
||||
patch.depends, patch.fixes, patch.disabled = set(), [], False
|
||||
|
||||
return all_patches
|
||||
|
||||
|
14
debian/tools/patchutils.py
vendored
14
debian/tools/patchutils.py
vendored
@@ -302,14 +302,14 @@ def read_patch(filename):
|
||||
if r is not None:
|
||||
subject = r.group(2).strip()
|
||||
r = re.search("v([0-9]+)", r.group(1), re.IGNORECASE)
|
||||
if r is not None: return "%s." % subject, int(r.group(1))
|
||||
if r is not None: return subject, int(r.group(1))
|
||||
r = re.match("(.*)\\((v|try|rev|take) *([0-9]+)\\)", subject, re.IGNORECASE)
|
||||
if r is not None: return "%s." % r.group(1).strip(), int(r.group(3))
|
||||
if r is not None: return r.group(1).strip(), int(r.group(3))
|
||||
r = re.match("(.*)[.,] *(v|try|rev|take) *([0-9]+)", subject, re.IGNORECASE)
|
||||
if r is not None: return "%s." % r.group(1).strip(), int(r.group(3))
|
||||
if r is not None: return r.group(1).strip(), int(r.group(3))
|
||||
r = re.match("([^:]+) v([0-9])+: (.*)", subject, re.IGNORECASE)
|
||||
if r is not None: return "%s: %s." % (r.group(1), r.group(3)), int(r.group(2))
|
||||
return "%s." % subject, 1
|
||||
if r is not None: return "%s: %s" % (r.group(1), r.group(3)), int(r.group(2))
|
||||
return subject, 1
|
||||
|
||||
header = {}
|
||||
with _FileReader(filename) as fp:
|
||||
@@ -330,7 +330,9 @@ def read_patch(filename):
|
||||
if not line.startswith(" "): break
|
||||
subject += line.rstrip("\r\n")
|
||||
assert fp.read() == line
|
||||
header['subject'], header['revision'] = _parse_subject(subject)
|
||||
subject, revision = _parse_subject(subject)
|
||||
if not subject.endswith("."): subject += "."
|
||||
header['subject'], header['revision'] = subject, revision
|
||||
|
||||
elif line.startswith("diff --git "):
|
||||
tmp = line.strip().split(" ")
|
||||
|
Reference in New Issue
Block a user