Archive for July, 2008
New features
Hello, it’s been a while since I’ve updated my blog and it was about time. I’ve come back from my vacation this week and I have added two new features to pkg_improved which I think are nice features to have.
The first feature is that pkg_add registers the installation time (seconds-since-epoch) in +CONTENTS as a “@comment DATE: 123124124″, pkg_info can then see the installation dates of installed ports with the new -n option (for viewing the date in human readable form) or with the -N option (prints out seconds-since-epoch). The reason why I added this is because I’ve seen people ask how they can get the installation time of packages, and in my opinion I don’t think that the filesystem should be the only holder of such information (e.g. fetching modification time of files contained in /var/db/pkg/*).
The second feature is dependency fixing (I’ve seen that portmaster does this), and what it does is to reconstruct the +REQUIRED_BY file for packages being installed with pkg_add or when pkg_create -O option is called from ports. In detail it checks every installed package for a @pkgdep that matches the installing package it add’s it to the installing package +REQUIRED_BY file. This slows down pkg_add somewhat but I think this should be the correct behaviour for pkg_add.
I’ve also added a percentage progress status to pkg_add -r (remote fetching packages). You can see instructions for testing the improved tools on my blog: http://wiki.freebsd.org/AndersNore/pkg_improved
Vacation
Today I’m going on a vacation to Greece for one week. I’ll be back next Thursday (10th). I’ve polished my project pkg_improved so I think that people could test it out to see if it works. There’s not a whole lot of change, just some speed gains here and there, you can check the CHANGES file posted for more details. You could also make a diff with /usr/src/usr.sbin/pkg_install/ but you will get a whole lot of syntax changes =(
If you want to test it, then just compile and install (NB! this will replace your normal pkg_* tools). You could always get back your original pkg_* tools by compiling and installing from /usr/src/usr.sbin/pkg_install . If you don’t want to replace your pkg_* tools you should just compile it and rename the executables (NB! You will not get proper behaviour from ports unless you change some PKG_* variables in /usr/ports/Mk/bsd.port.mk (see PKG_CMD). The first thing you should do after install is to run pkg_convert to cache the existing flat database, after that you don’t have to run it again unless you use the original pkg_* programs.
There’s some ideas that I’ve been looking into like adding date’s to installed packages (perhaps a @comment in +CONTENTS), recovering +REQUIRED_BY in pkg_add (after e.g. pkg_delete -f zip; pkg_add zip). These should probably be posted to a mailing list, but I’ll wait until I get home from Greece to post them.
pkg_improved: http://home.no.net/andenore/pkg_improved.tar.gz
(please e-mail me if you find bug’s and the like)