On Sep 16, 2005, at 6:03 PM, Bryan Irvine wrote:
I copied all the pacakges over to the new systesm and tried varying
forms of pkg_add *, pkg_add $(ls), blah blah blah and inevitably it
will get to a package that depends on another package (which is in
that directory as well) and the install will bomb.
Provide errors if you're having problems, not "it fails". What fails?
If you specify all packages on a single line, it will sort them
appropriately and install them in order, as has been stated
previously on this list. A `pkg_add *` should also be Just Fine, as
pkg_add searches . and URIs specified in $PKG_PATH.
And now! Super Happy Fun Ball Teaches pkg_add(1):
The ultra keen network way:
No tricks here, ladies and gentlemen; no packages up our sleeves!
# ls -lsa *.tgz
ls: *.tgz: No such file or directory
Have the audience look at the pretty girl in the leotard and set the
PKG_PATH environment variable so pkg_add will have somewhere
besides . to look for packages:
# export PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/
packages/`uname -m`/"
# echo $PKG_PATH
ftp://ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386/
Magic! And the audience is none the wiser.
# pkg_add bash-3.0.16p0-static
bash-3.0.16p0-static:libiconv-1.9.2: complete
bash-3.0.16p0-static:gettext-0.10.40p2: complete
Shell /usr/local/bin/bash appended to /etc/shells
bash-3.0.16p0-static: complete
(the .tgz after the package name is optional)
The annoying getting all the packages yourself way, with no lame
magic show references:
# ftp $PKG_PATH
> get bash-3.0.16p0-static.tgz
> get gettext-0.10.40p2.tgz
> get libiconv-1.9.2.tgz
Unset $PKG_PATH so only . will be searched.
# unset PKG_PATH
# echo $PKG_PATH
#
Get rid of those happily installed packages just for this example:
# pkg_delete bash-3.0.16p0-static gettext-0.10.40p2 libiconv-1.9.2
Shell /usr/local/bin/bash removed from /etc/shells
bash-3.0.16p0-static: complete
gettext-0.10.40p2: complete
libiconv-1.9.2: complete
Clean shared items: complete
# ls
bash-3.0.16p0-static.tgz gettext-0.10.40p2.tgz libiconv-1.9.2.tgz
# pkg_add bash-3.0.16p0-static.tgz
bash-3.0.16p0-static:gettext-0.10.40p2: complete
bash-3.0.16p0-static:libiconv-1.9.2: complete
Shell /usr/local/bin/bash appended to /etc/shells
bash-3.0.16p0-static: complete
If you're setting PKG_PATH incorrectly, pkg_add will make angry
monkey noises at you. Didn't your momma teach you to not taunt Super
Happy Fun Ball?
# pkg_delete bash-3.0.16p0-static
Shell /usr/local/bin/bash removed from /etc/shells
bash-3.0.16p0-static: complete
# ls
bash-3.0.16p0-static.tgz
# export PKG_PATH="this_aint_right"
# pkg_add bash-3.0.16p0-static.tgz
Can't find bash-3.0.16p0-static.tgz
/usr/sbin/pkg_add: bash-3.0.16p0-static.tgz:Fatal error
# unset PKG_PATH
# pkg_add bash-3.0.16p0-static.tgz
Shell /usr/local/bin/bash appended to /etc/shells
bash-3.0.16p0-static: complete
Marc's documentation is pretty super. Give it a whirl:
# man 1 pkg_add
Also, use an appropriate mirror.
My only complaint with the pkg_* tools is the lack of pkg_search: No
local metadata database to query against. Of course, I apparently
don't care enough to do more than peruse the Perl modules, simply
because $PKG_PATH makes it almost as trivial to install the root
package (at which point pkg_add of course grabs the deps for me). The
slack waves cancel each other out.
Don't forget to tip your waitresses, folks.
--
Bryan Allen
[EMAIL PROTECTED]
http://bda.mirrorshades.net
Cyberpunk is dead. Long live cyberpunk.