daklib.pdiff¶
Functions
  | 
async variant of subprocess.check_call  | 
  | 
Classes
  | 
|
  | 
- class daklib.pdiff._PDiffHashes(size, sha1, sha256)¶
 - _asdict()¶
 Return a new dict which maps field names to their values.
- _field_defaults = {}¶
 
- _fields = ('size', 'sha1', 'sha256')¶
 
- classmethod _make(iterable)¶
 Make a new _PDiffHashes object from a sequence or iterable
- _replace(**kwds)¶
 Return a new _PDiffHashes object replacing specified fields with new values
- sha1¶
 Alias for field number 1
- sha256¶
 Alias for field number 2
- size¶
 Alias for field number 0
- async daklib.pdiff._merge_pdiffs(patch_a, patch_b, resulting_patch_without_extension)[source]¶
 Merge two pdiff in to a merged pdiff
While rred support merging more than 2, we only need support for merging two. In the steady state, we will have N merged patches plus 1 new patch. Here we need to do N pairwise merges (i.e. merge two patches N times). Therefore, supporting merging of 3+ patches does not help at all.
The setup state looks like it could do with a bulk merging. However, if you merge from “latest to earliest” then you will be building in optimal order and still only need to do N-1 pairwise merges (rather than N-1 merges between N, N-1, N-2, … 3, 2 patches).
Combined, supporting pairwise merges is sufficient for our use case.