Date: Tue, 19 Aug 2008 23:50:51 +0200 From: Polytropon <freebsd@edvax.de> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Cc: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> Subject: Re: Fetching precompiled packages for external install Message-ID: <20080819235051.3686d9c1.freebsd@edvax.de> In-Reply-To: <44ljys26iz.fsf@be-well.ilk.org> References: <20080819181714.fb9d5ea1.freebsd@edvax.de> <44ljys26iz.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Multipart=_Tue__19_Aug_2008_23_50_51_+0200_07kTixdIzm8AC/B9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 19 Aug 2008 14:39:48 -0400, Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> wrote: > I don't see anything direct, but the *-depends-list targets will > probably get you close enough to work it out. Sorry, I don't know what "*-depends-list targets" refers to. But I think it's something about the ports which I don't want to use, instead, using the precompiled packages is what I wanted to. >From portinstall's -p option I know a similar behaviour: Things are compiled, installed, and put into packages/ as packages that could be transferred to another system. I read the pkg_add manpage many times, and now I have a solution. Watch out! it's ugly! But I think it works. #!/bin/sh # # getpkg.sh 2008-08-19 # # fetch a precompiled package as well as it dependencies # for further installation if [ "$1" = "" ]; then echo "$0 <package>" exit 1 fi echo -n "fetching $1 ... " if [ -f $1.tbz ]; then echo "$1.tbz already there" exit 1 fi pkg_add -fKnrv $1 > $1.txt 2>&1 echo "done" for DEP in `cat $1.txt | grep $1 | grep "depends on" | cut -d "'" -f 6 | cut -d "/" -f 2`; do echo "dependency for $1 is ${DEP}" $0 ${DEP} done rm $1.txt exit 0 One thing I don't know yet: Will such a collection of .tbz files be installable in a recursive way? Does pkg_add only need files in the format <name>.tbz, or is <name>-<version>.tbz required? I will check this. Up to this time, enjoy the ugly script. :-) Anyway, thanks for help. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... --Multipart=_Tue__19_Aug_2008_23_50_51_+0200_07kTixdIzm8AC/B9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080819235051.3686d9c1.freebsd>