Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2008 13:52:35 +0100
From:      Gergely CZUCZY <phoemix@harmless.hu>
To:        ports@freebsd.org
Subject:   pkg-plist and WWWDIR
Message-ID:  <20080215125235.GA58646@harmless.hu>

next in thread | raw e-mail | index | archive | help

--PEIAKu/WMn1b1Hv9
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello

I've been updating sysutils/nut from 2.2.0 to .1, and I've
hit some issues there.

First of all, bsd.port.mk sets WWWDIR for the actual port,
which is very nice of it. OTOH the CGI support is optional
in nut, which results in a conditional entry in pkg-plist.
the NUT_CGI plist variable is only set if the CGI support
is enabled, and WWWDIR is an absolute path. If the CGI
support is enabled, then NUT_CGI is set to an empty string.
And WWWDIR is added to the PKG_PLIST variables.

The resulting lines in pkg-plist is the following:
%%NUT_CGI%%%%WWWDIR%%/file

And when the pkg-plist is processed it preprends /usr/local,
since that's the PREFIX, so it will end up looking for ${PREFIX}/${WWWDIR},
which will result in /usr/local/usr/local/www/nut/file .

I've checked other ports, %%WWWDIR%% is used directly at other
places, so I think when an entry begins with a slash that will
transform to an absolute path, without prepending the PREFIX.
As i think the conditional %%NUT_CGI%% messes this auto-logic
up, and the double-prefix happens.

For now I've fixed this with a workaround, by not setting
the WWWDIR plist variable to WWWDIR, but to "www/nut".
I don't consider this a solution, but just a workaround.

My qestions are, how should these situations be handled?
Shouldn't bsd.port.mk export a version for WWWDIR suitable
for PLIST variables?

Sincerely,

Gergely Czuczy
mailto: gergely.czuczy@harmless.hu

--=20
Weenies test. Geniuses solve problems that arise.

--PEIAKu/WMn1b1Hv9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

owFdVc1uW0UUDo0AaaQuWrFgeVTVRKi+104CSZQoClXauBY/jRKjIHVRje8d+049
d+Z2fuK4USVWCAmQUFgifl4A1AVIXXSD2LHgBXgAHoAX4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+DmOi9qaEXJD14STblSXbYeyQhG2FmjQZ6wg7xE+w+yxkzyas5FJ5
swnD2pxm0fwBXvUSY11aBMaSZHulzY7wDEuaGnJKoYNfAg0R+4CTwO3CWqWrlYSl
Hd7aL3cWX1+gn4/zX54b1161Fn46bd95efDO4fY/j/xfZ6/e3vr58/9eLPy49Y1Y
f+sH9eevf3z35u4Xi/+un918+T8=
=oaI0
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080215125235.GA58646>