mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
patchupdate.py: Simplify code in generate_ifdefined.
This commit is contained in:
parent
6b40eb077f
commit
51d419bbeb
@ -58,7 +58,7 @@ upstream_commit()
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 2.14"
|
||||
echo "Wine Staging 2.15 (unreleased)"
|
||||
echo "Copyright (C) 2014-2017 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
|
@ -1 +1 @@
|
||||
Wine Staging 2.14
|
||||
Wine Staging 2.15 (unreleased)
|
||||
|
@ -446,11 +446,11 @@ def check_bug_status(all_patches, sync_bugs=False):
|
||||
|
||||
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])
|
||||
|
||||
for i, patch in enabled_patches.iteritems():
|
||||
for i, patch in all_patches.iteritems():
|
||||
if patch.ifdefined is None:
|
||||
continue
|
||||
if patch.disabled:
|
||||
continue
|
||||
|
||||
filename = os.path.join(patch.directory, config.path_IfDefined)
|
||||
headers = { 'author': "Wine Staging Team",
|
||||
@ -470,12 +470,12 @@ def generate_ifdefined(all_patches, skip_checks=False):
|
||||
fp.write(" %s <%s>\n" % (author, email))
|
||||
fp.write("\n")
|
||||
|
||||
depends = resolve_dependencies(enabled_patches, i)
|
||||
depends = resolve_dependencies(all_patches, i)
|
||||
for f in sorted(patch.modified_files):
|
||||
|
||||
# Reconstruct the state after applying the dependencies
|
||||
original = get_wine_file(f)
|
||||
selected_patches = select_patches(enabled_patches, depends, f)
|
||||
selected_patches = select_patches(all_patches, depends, f)
|
||||
failed = []
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user