June 2009 Archives

One of the things that Arch Linux does _not_ try to do is administer your system for you. One area where this bothers me is in a system upgrade procedure which goes roughly like this:

$ pacman -Syu
The above command will refresh the local cache of packages made available by any configured archlinux repositories, then proceed to upgrade any installed packages to the newest available version.
The (pac)kage (man)agement tool "pacman" does not provide the capability of merging new and exisiting configuration files. This is an intentional decision meant to assure that system settings won't be clobbered. As a result, you must manually scan through your filesystem after an update, looking for files with the *.pacsave or *.pacnew extensions, merge in any changes you would like, then (optionally) delete the *.pac{save,new} files. A tool called pacdiffviewer is provided by the yaourt package which can automate the previous procedure.

Another thing that pacman is not capable of is updating packages installed via the (A)rch (U)ser (R)epository, AUR (http://aur.archlinux.org/). One tool which is capable of (un)installing/updating/querying/etc. packages located in AUR is yaourt.

$ yaourt -Syu --aur --devel
The above command will update all packages on the entire system whether installed from pacman repositories or from the AUR.

A tool that I recently started using to manage my /etc/ directory is called etckeeper. Etckeeper can be configured to use one of several revision control systems (git, bzr, cvs, etc.) and creates and manages all of the revisions that /etc/* files go through. I've really enjoyed not having to manually make backups of config files when I experiment with new settings and it's good to know that I can easily roll-back or merge changes of files in the future if I decide that I liked things better the way they were before.

To put all of the previous things together and save my fingers some typing each day, I created the following alias in ~/.bashrc :
alias update='yaourt -Syu --aur --devel && sudo pacdiffviewer && cd /etc/ && sudo etckeeper commit; cd -'

My system upgrading is now done by simply typing "sysupgrade" as a normal user and interactively managing the rest of the process. 

About this Archive

This page is an archive of entries from June 2009 listed from newest to oldest.

March 2009 is the previous archive.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.25