Update Debian, RPM, Nix flake, and Python installer unit tests to match the current
installer behavior and to run correctly inside the Nix development shell.
- DebianControlInstaller:
- Add clearer docstrings for supports() behavior.
- Relax final install assertion to accept dpkg -i, sudo dpkg -i, or
sudo apt-get install -y.
- Keep checks for apt-get update, apt-get build-dep, and dpkg-buildpackage.
- RpmSpecInstaller:
- Add docstrings for supports() conditions.
- Mock _prepare_source_tarball() to avoid touching the filesystem.
- Assert builddep, rpmbuild -ba, and sudo dnf install -y commands.
- NixFlakeInstaller:
- Ensure supports() and run() tests simulate a non-Nix-shell environment
via IN_NIX_SHELL and PKGMGR_DISABLE_NIX_FLAKE_INSTALLER.
- Verify that the old profile entry is removed and both pkgmgr and default
flake outputs are installed.
- Confirm _ensure_old_profile_removed() swallows SystemExit.
- PythonInstaller:
- Make supports() and run() tests ignore the real IN_NIX_SHELL environment.
- Assert that pip install . is invoked with cwd set to the repository
directory.
These changes make the unit tests stable in the Nix dev shell and align them
with the current installer implementations.
Package Manager🤖📦
Kevins's Package Manager is a configurable Python tool designed to manage multiple repositories via Bash. It automates common Git operations such as clone, pull, push, status, and more. Additionally, it handles the creation of executable wrappers and alias links for your repositories.
Features 🚀
-
Installation & Setup:
Create executable wrappers with auto-detected commands (e.g.main.shormain.py). -
Git Operations:
Easily performgit pull,push,status,commit,diff,add,show, andcheckoutwith extra parameters passed through. -
Configuration Management:
Manage repository configurations via a default file (config/defaults.yaml) and a user-specific file (config/config.yaml). Initialize, add, delete, or ignore entries using subcommands. -
Path & Listing:
Display repository paths or list all configured packages with their details. -
Custom Aliases:
Generate and manage custom aliases for easy command invocation.
Installation ⚙️
Clone the repository and ensure your ~/.local/bin is in your system PATH:
git clone https://github.com/kevinveenbirkenbach/package-manager.git
cd package-manager
Install make and pip if not installed yet:
pacman -S make python-pip
Then, run the following command to set up the project:
make setup
The make setup command will:
- Make
main.pyexecutable. - Install required packages from
requirements.txt. - Execute
python main.py installto complete the installation.
Docker Quickstart 🐳
Alternatively to installing locally, you can use Docker: build the image with
docker build --no-cache -t pkgmgr .
or alternativ pull it via
docker pull kevinveenbirkenbach/pkgmgr:latest
and then run
docker run --rm pkgmgr --help
Usage 📖
Run the script with different commands. For example:
- Install all packages:
pkgmgr install --all - Pull updates for a specific repository:
pkgmgr pull pkgmgr - Commit changes with extra Git parameters:
pkgmgr commit pkgmgr -- -m "Your commit message" - List all configured packages:
pkgmgr config show - Manage configuration:
pkgmgr config init pkgmgr config add pkgmgr config edit pkgmgr config delete <identifier> pkgmgr config ignore <identifier> --set true
License 📄
This project is licensed under the MIT License.
Author 👤
Kevin Veen-Birkenbach
https://www.veen.world
Repository: github.com/kevinveenbirkenbach/package-manager
Created with AI 🤖 - View conversation