On Mon, Jan 31, 2011 at 01:29:40PM -0600, [email protected] wrote:
> I have a script to sort of kickstart an installation after doing a
> bare install of OpenBSD, and it's designed to be idempotent (won't
> hurt to run it several times).
> 
> Currently I install some packages, but that's a bit of a time-waster
> in that it will reinstall.  Is there a way I can test for whether a
> package has been installed already, given only the package name, and
> not necessarily the executable name (if there is one)?  I tried
> pkg_info and the exit code is zero even if the package isn't
> installed.

Try pkg_info | grep -q; or make pkg_info write to a file for faster
processing.

> Also, I've noticed that if I don't have X11 installed, I can't seem to
> install certain packages (such as subversion) and certain ports
> (EMACS, and even if I set FLAVOR=no_x11).  What's up with that?

xbase is now mandatory for packages, even no_x11 ones. Too many packages
require some graphics library or other. (If you really want to minimize
space, you can manually pick the required libraries out of xbase. But
that's unlikely to be worth the trouble.)

                Joachim

-- 
PotD: net/openvpn_bsdauth - BSD Auth helper program for OpenVPN
http://www.joachimschipper.nl/

Reply via email to