Altbrains stands for "Alt Linux Branches Inspector," a command-line utility and shared library that allows you to compare lists of binary packages from different branches of the Alt Linux distribution repository. . It retrieves package lists from the specified branches, performs a comparison, and generates a JSON report containing three sections:
- 'packages_only_in_source_branch': A list of packages that exist in the first branch but not in the second branch.
- 'packages_only_in_target_branch': A list of packages that exist in the second branch but not in the first branch.
- 'packages_with_higher_version_in_source_branch': A dictionary of packages and their respective versions from the first branch that have higher versions than those in the second branch.
The generated 'response.json' file will be placed in the current working directory. The comparison is based on the package names and their version numbers (after removing letters and special characters). Note that this utility requires an active internet connection to access the Alt Linux repository API.
This guide will walk you through the installation process for the altbrains
utility. Before proceeding, please make sure you have the following dependencies installed on your system:
- python3
- make
Begin by cloning the altbrains
repository to your local machine:
git clone https://github.com/quillahava/cli_utilite.git
Change your working directory to the root of the cloned repository:
cd cli_utilite
Note: altbrains
can be run directly with the command python altbrains
from the root directory of the project.
Run the following make
command to install altbrains
(administrative privileges may be required):
sudo make install
This will install altbrains
into your system.
To confirm that the installation was successful, you can use the following command to get help and see the available options for altbrains
:
altbrains -h
If the installation was successful, you will see the utility's help information.
Run the altbrains
with the desired branch names:
altbrains sisyphus p10 --arch x86_64
This command will compare the lists of binary packages between the sisyphus
and p10
branches with x86_64
architecture, and it will generate the response.json
file in the current directory.
After running the command, the response.json
file will be created with the following structure:
Warning: The utility's execution may take several minutes. To reduce waiting time, use the --arch
flag with the package architecture, e.g., --arch x86_64
.
{
"source_branch": "sisyphus",
"target_branch": "p10",
"source_packages_count": 1000,
"target_packages_count": 900,
"packages_only_in_source_branch": {
"count": 1,
"packages": [
{
"name": "package1",
"version": "1.0.0",
"release": "1"
}
]
},
"packages_only_in_target_branch": {
"count": 1,
"packages": [
{
"name": "package2",
"version": "2.0.1",
"release": "2"
}
]
},
"packages_with_higher_version_in_source_branch": {
"count": 1,
"packages": [
{
"name": "package3",
"version": "2.5.0",
"release": "3"
}
]
}
}
If, you want to uninstall altbrains
, you can use the following make
command:
sudo make uninstall
Now you have altbrains
installed and ready to use. You can run it with desired branch names to compare lists of binary packages between different branches of the Alt Linux distribution repository.
If you encounter any issues or have further questions, feel free to reach out. Happy using altbrains
! 🚀appy using altbrains
! 🚀