Subject: Re: Ease of Downloading Packages
To: tech-pkg@netbsd.org, Curt Sampson <cjs@cynic.net>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-pkg
Date: 12/22/2001 17:26:24
On Thu, 20 Dec 2001, Curt Sampson wrote:
> Actually, I think that it's pretty darn easy
> already; the only painful part is remembering the url
> (<ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All/>) and knowing
> what the package version number is (pine-4.33.tgz).
> 
> But what if, instead of typing
> 
>     pkg_add ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All/pine-4.33.tgz
> 
> I could just type
> 
>     pkg_add http://packages.netbsd.org/pine
> 
> and it would give me the latest version?

Do this:

	setenv PKG_PATH ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/All
	pkg_add -v pine


> and then we'd just need a script on that URL that would look up the latest
> version of the pine package for that version of NetBSD and architecure
> and issue an appropriate redirect, looking like this:

"the latest" is not enough. For the case of dependencies, it must be "the
latest matching the dependency", which may be different.

Oh, and finding "the latest" via ftp:// is one thing (and supported in
NetBSD!), http:// is something very different as it involves parsing HTML
output in various httpd's format. Not fun! (Left as an exercise... :-)

It seems some education on how our pkg system actually works seems needed
here. Please start by reading
http://www.netbsd.org/Documentation/software/pkg-wildcards.html


 - Hubert

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/