Re: test for installed status of package, ports questions
On 2011-01-31, Joachim Schipper joac...@joachimschipper.nl wrote: 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. that's incorrect, if something has a no_x11 package, and the *package* requires x11 libraries, that is a bug. however, building from ports without a full system installation is not supported, even for no_x11 flavours, and a system without X libraries will seriously restrict the packages you can install.
Re: test for installed status of package, ports questions
On Mon, Jan 31, 2011 at 01:29:40PM -0600, tra...@subspacefield.org 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/
Re: test for installed status of package, ports questions
On Mon, Jan 31, 2011 at 2:29 PM, tra...@subspacefield.org wrote: 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. $ pkg_info | grep ^png- /dev/null $ echo $? 0 $ pkg_info | grep ^banana- /dev/null $ echo $? 1 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? your whatchamacallit is undercalibrated.
Re: test for installed status of package, ports questions
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. When asked to install an already installed package, pkg_add does nothing (end exits with a zero status). 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? man packages says Some flavors are also explicitly provided to avoid having to depend on the kitchen sink. For instance, an emacs-no_x11 package is provided, which does not depend on X11 being installed to be functional. What is the actual command you are using and what is the error message? Also, how exactly are you using FLAVOR=no_x11 with _packages_ (not ports)?
Re: test for installed status of package, ports questions
Hi Travis, On Mon, Jan 31, 2011 at 12:29 PM, tra...@subspacefield.org wrote: Currently I install some packages, but that's a bit of a time-waster in that it will reinstall. B 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)? B I tried pkg_info and the exit code is zero even if the package isn't installed. Try pkg_info | grep pkgname. 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). B What's up with that? Covered in the FAQ: http://www.openbsd.org/faq/faq4.html#FilesNeededX -- Anthony J. Bentley
Re: test for installed status of package, ports questions
On Mon, Jan 31, 2011 at 13:29, tra...@subspacefield.org wrote: Hey all, 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. B 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)? B I tried pkg_info and the exit code is zero even if the package isn't installed. 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). B What's up with that? You still need xbase for some instances, even if you specify no_x11. I seem to remember that python needs some libs that are in xbase, even if X is not used.
Re: test for installed status of package, ports questions
$ pkg_info | grep ^banana- /dev/null Could also be $ pkg_info | grep -q ^banana-
Re: test for installed status of package, ports questions
There is an out-of-date script in infrastructure/build . It looks to me that it list everything installed. If it needs to be updated, it tells you that too. On Mon, Jan 31, 2011 at 12:42 PM, Bryan bra...@gmail.com wrote: On Mon, Jan 31, 2011 at 13:29, tra...@subspacefield.org wrote: Hey all, 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. B 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)? B I tried pkg_info and the exit code is zero even if the package isn't installed. 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). B What's up with that? You still need xbase for some instances, even if you specify no_x11. I seem to remember that python needs some libs that are in xbase, even if X is not used.