From owner-freebsd-questions@FreeBSD.ORG Wed Jan 21 01:32:03 2009 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 0742B106566B for ; Wed, 21 Jan 2009 01:32:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 9013B8FC08 for ; Wed, 21 Jan 2009 01:32:02 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-14-53.dynamic.qsc.de [92.196.14.53]) by mx02.qsc.de (Postfix) with ESMTP id 3F43916C002B; Wed, 21 Jan 2009 02:32:01 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n0L1Vtt9001648; Wed, 21 Jan 2009 02:31:55 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 21 Jan 2009 02:31:55 +0100 From: Polytropon To: Manolis Kiagias Message-Id: <20090121023155.8c8ea863.freebsd@edvax.de> In-Reply-To: <49765B5D.5090909@gmail.com> References: <49765B5D.5090909@gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: twh359@earthlink.net, freebsd-questions@freebsd.org Subject: Re: Newbie: offline package use / XFCE. 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: Wed, 21 Jan 2009 01:32:03 -0000 On Wed, 21 Jan 2009 01:16:45 +0200, Manolis Kiagias wrote: > In short, yes. And this will be quite difficult to get right. *Unless* > the machine you actually use to get the packages is also running > FreeBSD. You could then pkg_add -r xfce4 on it and then recreate all > the required packages and transfer them to the target machine. To > recreate the packages: > > [...] > > The same applies also if you decide to build xfce from Ports. You could > still create packages in the same way. > Simply copy the packages to a CD or USB drive, and pkg_add on the target > machine (note you will not use '-r' on it as all the packages are local) Just as a friendly sidenote: I need to put emphasize on the fact that you will need to install XFCE 4 on the machine with Internet access in order to follow this procedure. If you don't mind doing this or of you intend to run XFCE on that machine anyway, stop reading now. :-) If you intentionally DON'T want to install XFCE 4 on the machine you want to use to get the packages, how about trying this dirty script? ########################################################################### #!/bin/sh # # pkg_download.sh 2008-08-19 # =============== # # fetch a precompiled package as well as its 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 ########################################################################### Put this content into a file pkg_download.sh, chmod it +x and then run % ./pkg_download.sh xfce4 And yes, it's a very dirty solution, needlessly complicated, untidy and unfriendly to use, but it will work and bypass the need to install XFCE 4 on the machine to fetch. The script does not compile anything, it relies on the pkg_add -r mechanism and the presence of the proper packages on the default server. But please note that it will download any dependency needed recursively, which may lead you to a huge pile of tbz files. Just think about what Gtk 2 will need... I wrote this script in order to achieve the same goal as it has been requested initially. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...