Navigation
· Home
· Articles
· Downloads
· Speedtest
· FAQ
· Discussion Forum
· Web Links
· News Categories
· Merchandising Store
· Speedtest
· Photo Gallery
· Contact Me
· Search
· Wifi Chipset Query
· ASCII/Hex Converter
· Basic Linux Commands
Users Online
Login
pkgwatch A Package Management Wrapper

Introduction
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:
- to free me from remembering the exact commands for different systems
- to help me keep track of what packages I installed
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
- download from http://download.river-valley.com/pkgwatch/pkgwatch-1.0.tgz
- unpack and run installer (as root):
bash INSTALL.sh
- edit /etc/pkgwatchrc to fit your system. You must set PWTOOL and PWDIR:
- PWTOOL is the name of the package management system on your system. It must be one of the following:
aptitude-deb
apt-deb
urpm
yast-rpm
yum-rpm
fink-deb
macports-port
- PWTOOL is the name of the package management system on your system. It must be one of the following:
-
- PWDIR is a directory to keep track of package installation/removal.
- since I use mostly debian-based systems, I set default as follows:
PWTOOL=aptitude-deb
PWDIR=/root/config/pkgwatch
Usage examples
Instead 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:
- on an apt-based system this is similar to apt-get update
- on an yum system this is similar to yum update
- on macports (macosx) this is similar to port selfupdate
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:
- on deb-based system this is similar to dpkg --get-selections
- on rpm-based system this is similar to rpm -qa
pkg-file vim
List all files belonging to package vim.
- on deb-based system this is similar to dpkg -L vim
- on rpm-based system this is similar to rpm -ql vim
pkg-own /usr/bin/vim
Comments
Post Comment
Ratings
Please login or register to vote.


