pkgtreediff: Package tree diff tool

[ gpl, library, program, utility ] [ Propose Tags ]

Tool for comparing RPM packages and versions in OS dist trees or instances.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS] 0.1, 0.2, 0.2.1, 0.3, 0.4, 0.4.1, 0.5.0, 0.6.0
Change log
Dependencies async, base (<5), directory, extra, filepath, Glob, http-client (>=0.5.0), http-client-tls, http-directory (>=0.1.4 && <0.1.6 || >=0.1.8), koji, pkgtreediff, semigroups, simple-cmd (>=0.1.4), simple-cmd-args, text [details]
License GPL-3.0-only
Copyright 2019-2021 Jens Petersen
Author Jens Petersen
Category Utility
Home page
Bug tracker
Source repo head: git clone
Uploaded by JensPetersen at 2021-04-19T04:14:22Z
Distributions Fedora:0.6.0, LTSHaskell:0.6.0, Stackage:0.6.0
Executables pkgtreediff
Downloads 2396 total (35 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-04-19 [all 1 reports]

Readme for pkgtreediff-0.4.1

[back to package description]


Hackage GPL-3 license Stackage Lts Stackage Nightly

pkgtreediff compares the NVRs (name-version-release) of RPM packages in OS package trees and/or installations:

  • An OS tree can be referenced by an url or directory containing a tree of rpm files.
  • A file containing a list(s) of rpm NVRs can also be compared.
  • Commands can also be used to get installed RPMs, eg:
    • "rpm -qa"
    • "ssh myhost rpm -qa"
    • "podman run --rm myimage rpm -qa"
  • A koji tag: koji://tag@KojiHubUrl (or koji://tag@fedora)

Usage examples


Compare the content of two rpm based containers (new added packages in fedora:34)

$ pkgtreediff --new "podman run --rm fedora:33 rpm -qa" "podman run --rm fedora:34 rpm -qa"
dejavu-sans-fonts.noarch  2.37-16.fc34
fonts-filesystem.noarch  2.0.5-5.fc34
langpacks-core-en_GB.noarch  3.0-12.fc34
langpacks-core-font-en.noarch  3.0-12.fc34
langpacks-en_GB.noarch  3.0-12.fc34

Package trees

Package source changes between Fedora 30 and 31 Server at GA (ignoring release bumps):

$ pkgtreediff --ignore-release{32,33}/Server/source/tree/Packages/
ModemManager.src: 1.12.8-1.fc32 -> 1.14.2-1.fc33
NetworkManager.src: 1.22.10-1.fc32 -> 1.26.2-2.fc33
PackageKit.src: 1.1.13-2.fc32 -> 1.2.1-1.fc33
abrt.src: 2.14.0-2.fc32 -> 2.14.4-6.fc33
adwaita-icon-theme.src: 3.36.0-1.fc32 -> 3.38.0-1.fc33
alsa-lib.src: 1.2.2-2.fc32 ->
alsa-sof-firmware.src: 1.4.2-4.fc32 -> 1.5-2.fc33
anaconda.src: 32.24.7-1.fc32 -> 33.25.4-1.fc33
gobject-introspection.src: 1.64.1-1.fc32 -> 1.66.1-1.fc33
+ google-carlito-fonts.src  1.103-0.15.20130920.fc33
- google-crosextra-caladea-fonts.src  1.002-0.14.20130214.fc32
- google-crosextra-carlito-fonts.src  1.103-0.12.20130920.fc32
gpgme.src: 1.13.1-6.fc32 -> 1.14.0-2.fc33
xkeyboard-config.src: 2.29-1.fc32 -> 2.30-3.fc33
xxhash.src: 0.7.3-1.fc32 -> 0.8.0-1.fc33
yelp.src: 3.36.0-1.fc32 -> 3.38.1-1.fc33
yelp-xsl.src: 3.36.0-1.fc32 -> 3.38.1-1.fc33
- zram.src  0.4-1.fc32
zstd.src: 1.4.4-2.fc32 -> 1.4.5-5.fc33

Updated: 340
Added: 27
Deleted: 32
Arch changed: 0
Total packages: 937 -> 932


Compare the packages on local and another host:

pkgtreediff "rpm -qa" "ssh otherhost rpm -qa"

Any types of sources can be compared, together with the use of flags.


Compare koji tags using the koji://tag@kojihub syntax:

pkgtreediff koji://dist-c8-updates-build@centos koji://dist-c8_1-updates-build@centos

Please avoid using koji tag to compare full releases as it is more efficient to query URL or CMD trees.


pkgtreediff is packaged in Fedora.

Older builds are also available in copr for Fedora, EPEL, and OpenSuSE (more details).

RPM version ordering

RPM version ordering is somewhat involved For example "1.2.1^rc1" < "1.2.1" (similarly for tilde).

pkgtreediff tries to implement the rpmvercmp() algorithm, but it has not been verified to behave identically.