A question about dwnloading Ports

Randy Pratt rpratt1950 at earthlink.net
Fri Jun 17 15:51:11 GMT 2005


On Fri, 17 Jun 2005 15:42:13 +0200
Arek Czereszewski <arek at wup-katowice.pl> wrote:

> Użytkownik 子耗 napisał:
> 
> > I am a new user to Freebsd. I do not have a high speed connection, so
> > I could not install softwares from ports directly. It takes me a lot
> > of time. I wonder how to download the whole ports, so that I could
> > download it in Net Cafe, and save it to my moible harddisk and then, I
> > could install softwares after I get home. It is of no use to download
> > the ports trees only. I need to download all the source codes the
> > first time, and I could use cvs system to update it.
> > 
> 
> If you want for example install mc
> # cd /usr/ports/misc/mc
> # make fetch-recursive
> ===> Fetching all distfiles for mc-4.6.0_15 and dependencies
> ....
> 
> And you have mc with  dependencies.
> All downloaded files you have in:
> /usr/ports/distfiles/
> 

If the original poster is just looking for a list of sites that
have the distribution files he's interested in, then

	# cd /usr/ports/<category>/<port>
	# make fetch-recursive-list

would give a list of all sites that have the distribution files.

Its not a very user readable list and a small script might be
helpful:

find_dist_files.sh:
=================begin-script=====================
#!/bin/sh
#<title>Make a list of distfiles needed for a port</title>

tempfile="/tmp/distfiles_list.txt"

make fetch-recursive-list > ${tempfile}

while read line; do
  for i in ${line}; do
    echo ${i} | grep "^http"
    echo ${i} | grep "^ftp"
  done
  echo
done < ${tempfile}

rm ${tempfile}
=================end-of-script===================

Make the script excutable and in your path, cd to the port
directory you're interested in and run the script.  It'll
give a list of all distribution files needed for a port which
could be redirected to a file to take to some other location
for retrieval, for ex:

	cd /usr/ports/www/zope-simpleblog
	find_dist_files.sh > mylist.txt

I'm sure there's a multitude of ways to do this but it should give
you some ideas.

HTH,

Randy
	

-- 


More information about the freebsd-questions mailing list