Skip to content

daniilantonenko/pl-comparer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package list comprare

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)

Examples

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.

Add to project

#include <pl-comparer/pl-comparer.h>
using namespace PackageListComparer;
using json = nlohmann::json;

Getting binary packages

std::string arch = "x86_64";
std::string first = "sisyphus";
std::string second = "p10";
json source = loadJson(first, arch);
json target = loadJson(second, arch);

Run comparison

Make comparison and get result:

nlohmann::json resultJson = comparing(first, second);

CLI utility

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.

Building and installation

For building and installation instructions refer to INSTALL.md.

Plan

  • Basic comparison functionality
  • Get lists of binary packages
  • CLI utility
  • Installation by FHS standard
  • Selecting a branch
  • Added unit tests
  • Getting arch by API

About

Сomparing binary packages of 2 arches

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published