Subject: Re: Use of ${PKGNAME} can lead to confusion
To: Roland Illig <rillig@NetBSD.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-pkg
Date: 10/09/2005 15:02:44
--bE2XbrxqIoa/xW9+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Oct 09, 2005 at 01:58:03PM +0200, Roland Illig wrote:
> Quentin Garnier wrote:
> >On Sun, Oct 09, 2005 at 12:46:30PM +0200, Roland Illig wrote:
> >
> >>Hi,
> >>
> >>many package authors (at least 39) assume that if they write the=20
> >>following, the distfiles are downloaded into ${DISTDIR}/package-1.0. Bu=
t=20
> >>they are wrong.
> >>
> >>PKGNAME=3D          package-1.0
> >
> >
> >You really mean PKGNAME here, not DISTNAME?
> >
> >
> >>PKGREVISION=3D      4
> >>DIST_SUBDIR=3D      ${PKGNAME}
>=20
> Yes, I mean it. ;) I still find that the PKGNAME is more important than=
=20
> the DISTNAME, and that DISTNAME should be derived from PKGNAME, not the=
=20
> other way round.

Well, you'd better not mixing other changes when giving an example of
something expected to be found in the tree.  That's really confusing.

> >You should be aware that most (if not all) occurrences of
> >"DIST_SUBDIR=3D${PKGNAME}" are likely to be there on purpose, because at
> >least once the distfile was changed when its name didn't.
>=20
> Currently there's absolutely no indication (except from "cvs log"=20
> sometimes) whether the author intended to use PKGNAME or PKGNAME_NOREV.=
=20
> That's why I proposed the PKGNAME_REV variable.

You mean, no indication besides common sense?  There are very little
cases where DIST_SUBDIR=3D${PKGNAME_NOREV} would make sense.

While having PKGNAME_REV is probably a good idea, the example for which
you think it would be useful is bogus.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--bE2XbrxqIoa/xW9+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQ0kU9NgoQloHrPnoAQKdawgAtwE0au2CnUlxcOqZ1cqbHJokgDj8NXr4
Tmwp7ptNWqZIHFJc34Dme1aILaR2xQQJCbQo206h3Qr/09RO90uzC5NbEzeKLus/
e5G6XEFWyH5vndGqOANg3clbDj5kZHaWWLoInVFzSUUdUtxIlqVIFB8MC7jGH6vy
w/SfJ6ltZ5AhREGNGpLY6EUbmwOnczQpl9+q8+msE8bwmMr7MkOHV7hAf3THP/CN
kh+Ird+YsmGIT9P8VG93LkntJHML/YhuxQQvcFcWq8DUOy8DY5GnSot6ptFMwq4q
rFBIhBlJDL82W0ZBEvAiLZTR5zEc6CYcZZK3YJRFTJhty3b/SOggzA==
=Que8
-----END PGP SIGNATURE-----

--bE2XbrxqIoa/xW9+--