This is yet another wrapper script for
pacman, the package manager
of Arch Linux and its various derivatives. Unlike other wrappers, this
script does not aim to make up for any perceived shortcomings in the
pacman. Instead, it aims to make up for
shortcomings in the users of
pacman. The goal of
pacnanny is to
make it even harder to mess up with
pacman by making sure that you
do not miss anything important.
pacnanny automatically does the following:
- Before doing a system update, check for new Arch Linux news items since the last update and display them one at a time in the browser of your choosing (w3m by default). There is no confirmation. Your eyeballs are required to look at the news.
- Reprint all scriptlet messages together after an update is completed.
- Reprint all warnings again together after an update is completed.
- List new
.pacsavefiles after an update is completed.
- Print a warning and ask for confirmation when using the
- Prompt for a reboot when the kernel has been upgraded.
All of these functions can be disabled in the configuration file,
/etc/pacnanny.conf, letting you customize the level of
pacnanny also can perform some useful tasks on its own:
- Display the full history of a package on your system (installation, upgrades, etc.)
- Display the
pacmanlog for a given date or range of dates, including descriptive dates like "yesterday" or "today".
pacnanny is a thin wrapper that mostly looks at the arguments you
pass before passing them on and at the output that
produces. You can simply use the
pacnanny command in place of
pacman and use all the familiar arguments. So, to do a system
update, you would do
pacnanny functions have their own arguments:
$ pacnanny --log [date(:date)] $ pacnanny --history [package(s)]
As careful as I try to be when I run
pacman -Syu, I still
occasionally miss things, particularly during large updates that
produce a lot of text. Important warnings sometimes slip between the
cracks, causing me to miss an important new
.pacnew file, for
example. As for the news, I do subscribe to the RSS feed but sometimes
I update the system before opening my newsreader. This forces me to
see the news first.
As it turns out, someone already had the same idea as me (albeit several years earlier): Pacmatic. I was not aware of Pacmatic until after I had already written Pacnanny. The two scripts share similar features but they also have their differences. I recommend trying both and choosing the one that better suits your needs.
Are there other places that we can help the user avoid shooting himself in the foot? I'm open to ideas. Contributions are welcome as long as they stick to the basic idea of only trying to correct/prevent user-error/carelessness. Also, I'm not great at shell scripting, so please point out any mistakes or places for improvement.
Brandon Invergo - firstname.lastname@example.org