mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchupdate.py: Make more clear what the functions causal_time_relation* do.
This commit is contained in:
parent
7154d8ae74
commit
9af0621843
16
debian/tools/patchupdate.py
vendored
16
debian/tools/patchupdate.py
vendored
@ -197,18 +197,18 @@ def _pairs(a):
|
||||
for k in a[i+1:]:
|
||||
yield (j, k)
|
||||
|
||||
def causal_time_relation_any(all_patches, indices):
|
||||
"""Checks if the patches with given indices are applied in a very specific order."""
|
||||
def causal_time_relation(all_patches, indices):
|
||||
"""Checks if the dependencies of patches are compatible with a specific apply order."""
|
||||
for i, j in _pairs(indices):
|
||||
if not (causal_time_smaller(all_patches[i].verify_time, all_patches[j].verify_time) or \
|
||||
causal_time_smaller(all_patches[j].verify_time, all_patches[i].verify_time)):
|
||||
if causal_time_smaller(all_patches[j].verify_time, all_patches[i].verify_time):
|
||||
return False
|
||||
return True
|
||||
|
||||
def causal_time_relation(all_patches, permutation):
|
||||
"""Checks if the dependencies of patches are compatible with a specific order."""
|
||||
for i, j in _pairs(permutation):
|
||||
if causal_time_smaller(all_patches[j].verify_time, all_patches[i].verify_time):
|
||||
def causal_time_relation_any(all_patches, indices):
|
||||
"""Similar to causal_time_relation(), but also check all possible permutations of indices."""
|
||||
for i, j in _pairs(indices):
|
||||
if not (causal_time_smaller(all_patches[i].verify_time, all_patches[j].verify_time) or \
|
||||
causal_time_smaller(all_patches[j].verify_time, all_patches[i].verify_time)):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user