DeltaRepo Updater - Tojaj/DeltaRepo GitHub Wiki

Tool + python library for updating repositories with support for deltarepos.

CLI Interface

Repodata updating (User)

updaterepo [--target CONTENTHASH] <delta_repos_mirror> <local_repo>

delta_repos_mirror shoud be addres on wich delaterepos.xml.xz exists

Options

  • --only METADATA_TYPE - Update only this metadata. Could be specified multiple times. (E.g. --only primary --only filelists)

Delta repositories management (Administrator)

managedeltarepos [options] <old_repo> <new_repo> [deltarepos_dir]

  • Make delta old_repo -> new_repo. Store it to the deltarepos_dir.
  • If no deltarepos_dir is specified, the current working directory is used.
  • The record for the newly created deltarepo is added to the deltarepos_dir/deltarepos.xml.xz file (if the file doesn't exists, it will be created).

createdeltarepo --gendeltareposfile [-o|--outputdir DIR] <deltarepos_dir>

  • If DIR is specified, the delaterepos.xml will be generated there (existing deltarepos.xml will be overwritten).

Internal implementation

Delta repositories management (Administrator)

  • Make temporary directory /tmp/deltarepo-timestamp-XXXXXX/
  • deltarepos_dir/ could be public directory so it is better to do temporary directories somewhere else.
  • Generate delta repository
  • Move delta repository to the deltarepos_dir/
  • Update/Create deltarepos.xml.xz file in the deltarepos_dir/

Repodata updating (User)

  • Analyze the local_repo
  • Get the revision
  • Get the highest timestamp in the repodata.xml
  • Get contenthash
  • Get the list of available metadata files (primary, filelists, ...)
  • Download the current repomd.xml from the remote repository
  • Download the current deltarepos/delaterepos.xml.xz
  • If delaterepos.xml.xz was downloaded:
  • Find the target contenthash, use the supplied CONTENTHASH or find out the most current.
  • Found appropriate delta or chain of deltas that have to be used.
  • Calculate expenses for this update (total downloaded size)
  • When we have a list of deltas that has to be applied, download them - sequentially
  • Apply delta right after it is downloaded, simultaneously with downloading of the next delta.
  • Done
⚠️ **GitHub.com Fallback** ⚠️