mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchupdate.py: Add 'Apply-Before' definition field and fix a bug in dependency resolution.
This commit is contained in:
parent
e9cda98df5
commit
51d7077f51
17
debian/tools/patchupdate.py
vendored
17
debian/tools/patchupdate.py
vendored
@ -300,6 +300,11 @@ def read_patchset(revision = None):
|
||||
if i != j and any([fnmatch.fnmatch(f, val) for f in other_patch.modified_files]):
|
||||
patch.auto_depends.add(j)
|
||||
|
||||
elif key == "apply-before":
|
||||
for j, other_patch in all_patches.iteritems():
|
||||
if i != j and any([fnmatch.fnmatch(f, val) for f in other_patch.modified_files]):
|
||||
other_patch.auto_depends.add(i)
|
||||
|
||||
elif key == "category":
|
||||
val = "category-%s" % val
|
||||
if name_to_id.has_key(val):
|
||||
@ -432,7 +437,7 @@ def select_patches(all_patches, indices, filename):
|
||||
selected_patches[i] = extract_patch(all_patches[i], filename)
|
||||
return selected_patches
|
||||
|
||||
def resolve_dependencies(all_patches, index = None, depends = None):
|
||||
def resolve_dependencies(all_patches, index = None, depends = None, auto_deps = True):
|
||||
"""Returns a sorted list with all dependencies for a given patch."""
|
||||
|
||||
def _resolve(depends):
|
||||
@ -450,7 +455,7 @@ def resolve_dependencies(all_patches, index = None, depends = None):
|
||||
# Recusively resolve dependencies
|
||||
all_patches[i].verify_resolved = -1
|
||||
_resolve(all_patches[i].depends)
|
||||
_resolve(all_patches[i].auto_depends)
|
||||
if auto_deps: _resolve(all_patches[i].auto_depends)
|
||||
all_patches[i].verify_resolved = 1
|
||||
resolved.append(i)
|
||||
|
||||
@ -459,8 +464,10 @@ def resolve_dependencies(all_patches, index = None, depends = None):
|
||||
|
||||
resolved = []
|
||||
if depends is None:
|
||||
depends = all_patches[index].depends
|
||||
_resolve(depends)
|
||||
_resolve(all_patches[index].depends)
|
||||
if auto_deps: _resolve(all_patches[index].auto_depends)
|
||||
else:
|
||||
_resolve(depends)
|
||||
return resolved
|
||||
|
||||
def generate_ifdefined(all_patches):
|
||||
@ -684,7 +691,7 @@ def generate_script(all_patches):
|
||||
|
||||
# List dependencies (if any)
|
||||
if len(patch.depends):
|
||||
depends = resolve_dependencies(all_patches, i)
|
||||
depends = resolve_dependencies(all_patches, i, auto_deps=False)
|
||||
lines.append("# | This patchset has the following (direct or indirect) dependencies:\n")
|
||||
lines.append("# | *\t%s\n" % "\n# | \t".join(textwrap.wrap(
|
||||
", ".join([all_patches[j].name for j in depends]), 120)))
|
||||
|
1
patches/d3d11-Fix_Compile/definition
Normal file
1
patches/d3d11-Fix_Compile/definition
Normal file
@ -0,0 +1 @@
|
||||
Apply-Before: *
|
@ -1981,6 +1981,18 @@ if test "$enable_patchlist" -eq 1; then
|
||||
fi
|
||||
|
||||
|
||||
# Patchset d3d11-Fix_Compile
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/utils.c
|
||||
# |
|
||||
if test "$enable_d3d11_Fix_Compile" -eq 1; then
|
||||
patch_apply d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "d3d11: Fix compile failure with recent version of gcc.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset Compiler_Warnings
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -2287,18 +2299,6 @@ if test "$enable_crypt32_CMS_Certificates" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d11-Fix_Compile
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/utils.c
|
||||
# |
|
||||
if test "$enable_d3d11_Fix_Compile" -eq 1; then
|
||||
patch_apply d3d11-Fix_Compile/0001-d3d11-Fix-compile-failure-with-recent-version-of-gcc.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "d3d11: Fix compile failure with recent version of gcc.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-DesktopWindow
|
||||
# |
|
||||
# | Modified files:
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user