pkgwatch -- A Package Management Wrapper
pkgwatch -- A Package Management WrapperIntroductionIn the past I was trying many different linux distros. Each has its own package management systems: debian has apt, mandrake has urpmi, yellowdog has an apt front-end for rpm, suse has yast... While they all are quite similar and not difficult to use, I found that I often made mistakes because I often forgot which system I was using and the exact commands on that system. Another issue is that I wish I could keep track how I installed/removed those packages. So I wrote a simple wrapper for various package management systems. It serves two purposes:
For example, when I need to install e.g. vim, I always say pkg-install vim, and the wrapper would invoke aptitude, apt-get or yum depending on the current system.
Installation
Usage examplesInstead of listing all the details, I describe the commands I use most frequently and the effect of each command. pkg-update Update the package management:
pkg-install vim Install package vim. The details of this command will be explained later. pkg-remove vim Remove package vim. pkg-list List all installed packages on my system:
pkg-file vim List all files belonging to package vim.
pkg-own /usr/bin/vim Find which package owns file /usr/bin/vim:
pkg-info vim Display info about package vim:
pkg-check vim Check whether package vim is already installed on my system:
pkg-search vim Search for all packages containing vim in their name:
The above commands don't cover everything, however I find them enough for regular use. If I need something more specific, then I had no choice but use the exact command of the underlying system, for example apt.
Keep track of installed packagesLet's again use examples to illustrate things. Assume we have a fresh debian-based system.In our /etc/pkgwatchrc we have:PWTOOL=aptitude-deb
While it might looks a bit confusing at the first sight, the concept of this is really simple: anytime we run pkg-install or pkg-remove, a new file pkglist.<number>
will be created, with the number increased after each run. The contents
of this file is the list of package being installed or removed during
that run. Packages marked with + are those that have been installed, and packages marked with - are those that have been removed. Apart from that, during installation a symlink pkglist.<package-name> is created, and during removal that symlink is removed.
Further notes
|



Recent comments
1 day 21 hours ago
2 days 6 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 11 hours ago
2 days 13 hours ago
2 days 15 hours ago
2 days 16 hours ago
3 days 8 hours ago
3 days 9 hours ago