hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20050326] Playing the pkg upgrade game
After knowing about pkg_chk and pkg_comp for quite some time, I took some time to look into them yesterday. I started with pkg_chk, which told me which of my pkgs were outdated, and gave me some commands to rebuild it, but when I tried to ask it for actions on how to rebuild a single pkg including depends (gimp), I didn't get anywhere useful, and decided to return to pkg_chk at a later point.

Looking into pkg_comp was a nice surprise, as this "pkg compiler" sets up a chroot/sandbox environment to build pkgs in, without affecting the "normal" system. Having binary sets from the netbsd-3 branch here, I told it to build pkgs for NetBSD 3.0 (pkg_comp can fake kernel version with ... one of these pkgs that I've forgotten the name of. libkver. :). Building binary pkgs works smooth, and I'm going through a whole "pkg_comp build meta-pkgs/kde3" right now, which makes some nice progress. Mmm, binary pkgs. :)

It seems that pkg_chk and pkg_comp make a good team to first check what needs updating, then prepare binary pkgs in a sandbox, remove outdated pkgs and re-install them from those binary pkgs. Funny enough, Gavan Underhand wrote a script to do exactly that!. Maybe this is the ultimate answer to the ``how do I upgrade pkg XXX and its depends without hosing the system when something goes wrong''-question? Time will tell!

[Tags: ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 36037530
Copyright (c) Hubert Feyrer