Subject: Re: Use of ${PKGNAME} can lead to confusion
To: Hubert Feyrer <feyrer@cs.stevens.edu>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 10/09/2005 20:48:24
On 10/9/05, Hubert Feyrer <feyrer@cs.stevens.edu> wrote:
> On Sun, 9 Oct 2005, Roland Illig wrote:
> > PKGNAME_NOREV already exists. Since years.
>
> Then maybe use it to define DIST_SUBDIR (or whatever that variable's
> responsible for the problem you raised). What's the matter?
The "problem" is that the current PKGNAME is difficult to understand.
You can define it to a specific value in your package and pkgsrc will
internally change it to append the revision number.
As Roland said, if you have something like:
DISTNAME=3D foo_1.0
PKGNAME=3D ${DISTNAME:S/_/-/}
PKGREVISION=3D 1
What's the value of PKGNAME? foo-1.0? No! It's foo-1.0nb1.
I.e., it's wired that you have to use PKGNAME_NOREV to get the exact
value you explicitly set to PKGNAME. It should be the other way around
(leave PKGNAME as is, and have a variable that is set by pkgsrc to
whatever it needs).
Or at least, that's what I understood :-)
--
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/