From owner-freebsd-questions@FreeBSD.ORG Tue Aug 19 21:50:54 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 991941065672 for ; Tue, 19 Aug 2008 21:50:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2048FC1B for ; Tue, 19 Aug 2008 21:50:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-135-36.dynamic.qsc.de [92.195.135.36]) by mx01.qsc.de (Postfix) with ESMTP id 2A53850F1F; Tue, 19 Aug 2008 23:50:52 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id m7JLopqu004306; Tue, 19 Aug 2008 23:50:51 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 19 Aug 2008 23:50:51 +0200 From: Polytropon To: "freebsd-questions@freebsd.org" 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> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__19_Aug_2008_23_50_51_+0200_07kTixdIzm8AC/B9" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Lowell Gilbert Subject: Re: Fetching precompiled packages for external install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 21:50:54 -0000 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 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 " 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 .tbz, or is -.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--