Shared library for comparing binary packages of 2 branches. Works only with json sorted in descending order!
Output JSON structure:
- missing (all packages that are in the 1st but not in the 2nd)
- extra (all packages that are in the 2nd but are not in the 1st)
- updated (all packages whose version-release is greater in the 1st than in the 2nd)
Some examples to give you an idea how to use the class. Beside the examples below, you may want to browse the standalone example files.
Has a dependency on nlohmann::json.
#include <pl-comparer/pl-comparer.h>
using namespace PackageListComparer;
using json = nlohmann::json;
std::string arch = "x86_64";
std::string first = "sisyphus";
std::string second = "p10";
json source = loadJson(first, arch);
json target = loadJson(second, arch);
Make comparison and get result:
nlohmann::json resultJson = comparing(first, second);
Then the command line is given as:
plcomparer -a x86_64 -s sisyphus -t p10
a [branch]
Arch selection.s [arch]
Branch source name.t [arch]
Branch target name.p
Print Json comparison result.d
Print beautiful Json dump comparison result.f
Saving beautiful Json dump comparison result.h
Print this help message and exit.
For building and installation instructions refer to INSTALL.md.
- Basic comparison functionality
- Get lists of binary packages
- CLI utility
- Installation by FHS standard
- Selecting a branch
- Added unit tests
- Getting arch by API