mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchupdate.py: Fix issue in patch dependency detection (ntdll-Junction_Points depend on ntdll-Fix_Free to apply properly).
This commit is contained in:
parent
15a19d27fc
commit
f4e3d72fc1
15
debian/tools/patchupdate.py
vendored
15
debian/tools/patchupdate.py
vendored
@ -376,6 +376,7 @@ def verify_patch_order(all_patches, indices, filename):
|
||||
# Fast path -> we know that it applies properly
|
||||
if cached_patch_result.has_key(unique_hash):
|
||||
result_hash = cached_patch_result[unique_hash]
|
||||
assert result_hash is not None
|
||||
|
||||
else:
|
||||
# Now really get the file, if we don't have it yet
|
||||
@ -386,19 +387,25 @@ def verify_patch_order(all_patches, indices, filename):
|
||||
try:
|
||||
content = patchutils.apply_patch(original_content, patches, fuzz=0)
|
||||
except patchutils.PatchApplyError:
|
||||
if last_result_hash is not None: break
|
||||
# Remember that we failed to apply the patches, but continue, if there is still a chance
|
||||
# that it applies in a different order (to give a better error message).
|
||||
failed_to_apply = True
|
||||
continue
|
||||
if last_result_hash is None:
|
||||
continue
|
||||
break
|
||||
|
||||
# Get hash of resulting file and add to cache
|
||||
result_hash = hashlib.sha256(content).digest()
|
||||
cached_patch_result[unique_hash] = result_hash
|
||||
|
||||
# No known hash yet, remember the result. If we failed applying before, we can stop now.
|
||||
if last_result_hash is None:
|
||||
last_result_hash = result_hash
|
||||
if failed_to_apply: break
|
||||
|
||||
# Applied successful, but result has a different hash - also treat as failure.
|
||||
elif last_result_hash != result_hash:
|
||||
last_result_hash = None
|
||||
failed_to_apply = True
|
||||
break
|
||||
|
||||
# If something failed, then show the appropriate error message.
|
||||
@ -406,7 +413,7 @@ def verify_patch_order(all_patches, indices, filename):
|
||||
raise PatchUpdaterError("Changes to file %s don't apply on git source tree: %s" %
|
||||
(filename, ", ".join([all_patches[i].name for i in indices])))
|
||||
|
||||
elif failed_to_apply or last_result_hash is None:
|
||||
elif failed_to_apply:
|
||||
raise PatchUpdaterError("Depending on the order some changes to file %s dont't apply / lead to different results: %s" %
|
||||
(filename, ", ".join([all_patches[i].name for i in indices])))
|
||||
|
||||
|
@ -572,7 +572,7 @@ ntdll-Heap_FreeLists.ok:
|
||||
# | * dlls/kernel32/path.c, dlls/kernel32/volume.c, dlls/ntdll/file.c, dlls/ntdll/tests/file.c, include/ntifs.h
|
||||
# |
|
||||
.INTERMEDIATE: ntdll-Junction_Points.ok
|
||||
ntdll-Junction_Points.ok:
|
||||
ntdll-Junction_Points.ok: ntdll-Fix_Free.ok
|
||||
$(call APPLY_FILE,ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch)
|
||||
$(call APPLY_FILE,ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch)
|
||||
$(call APPLY_FILE,ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch)
|
||||
|
@ -1,4 +1,5 @@
|
||||
Author: Erich E. Hoover
|
||||
Subject: Support for junction points/reparse points.
|
||||
Revision: 1
|
||||
Depends: ntdll-Fix_Free
|
||||
Fixes: [12401] Support for Junction Points
|
||||
|
Loading…
Reference in New Issue
Block a user