Module chunking

Module chunking 

Source
Expand description

Split an OSTree commit into separate chunks

StructsΒ§

Chunk πŸ”’
Chunking
How to split up an ostree commit into β€œchunks” - designed to map to container image layers.
Generation πŸ”’
ObjectMetaSized
Extend content source metadata with sizes.
ObjectSourceMetaSized
Object metadata, but with additional size data

ConstantsΒ§

HIGH_PARTITION πŸ”’
LOW_PARTITION πŸ”’
MAX_CHUNKS πŸ”’
Maximum number of layers (chunks) we will use.
MIN_CHUNKED_LAYERS πŸ”’
Minimum number of layers we can create in a β€œchunked” flow; otherwise we will just drop down to one.

FunctionsΒ§

basic_packing πŸ”’
Given a set of components with size metadata (e.g. boxes of a certain size) and a number of bins (possible container layers) to use, determine which components go in which bin. This algorithm is pretty simple: Total available bins = n
basic_packing_with_prior_build πŸ”’
If the current rpm-ostree commit to be encapsulated is not the one in which packing structure changes, then Flatten out prior_build_metadata to view all the packages in prior build as a single vec Compare the flattened vector to components to see if pkgs added, updated, removed or kept same if pkgs added, then add them to the last bin of prior if pkgs removed, then remove them from the prior[i] iterate through prior[i] and make bins according to the name in nevra of pkgs to update required packages else if pkg structure to be changed || prior build not specified Recompute optimal packaging structure (Compute partitions, place packages and optimize build)
generate_chunking_recurse πŸ”’
get_partitions_with_threshold πŸ”’
Given a certain threshold, divide a list of packages into all combinations of (high, medium, low) size and (high,medium,low) using the following outlier detection methods:
push_dirmeta πŸ”’
push_dirtree πŸ”’

Type AliasesΒ§

ChunkMapping πŸ”’
Maps from a checksum to its size and file names (multiple in the case of hard links).
RcStr πŸ”’
A convenient alias for a reference-counted, immutable string.