Subject: Re: RCD_SCRIPTS problems
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Quentin Garnier <cube@cubidou.net>
List: tech-pkg
Date: 06/06/2005 17:13:21
--ptFpZ2xYd+337/mr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 06, 2005 at 03:20:03PM +0200, Manuel Bouyer wrote:
> On Mon, Jun 06, 2005 at 03:16:53PM +0200, Manuel Bouyer wrote:
> > Hi,
> > I'm working on a new package, which provides a rc.d script. The problem=
 is
> > that setting RCD_SCRIPTS doesn't cause the script to be installed in
> > examples/rc.d/ in mu case (I do have a files/vmpsd.sh script).
> > Attached is the Makefile. Any idea on what's missing ?
>=20
> Sorry, here's the Makefile

> WRKSRC=3D		${WRKDIR}/vmpsd
                                  ^^^^^
> RCD_SCRIPTS+=3D	vmpsd
                ^^^^^

This is the reason why you're seeing that phenomena.

While doing its magic, pkgsrc creates the final version of the script
and stores it into ${WRKDIR} before installing it into its final place.
Here the script creation fails because it already exists as a directory.

Now, 1.  why doesn't pkgsrc actually fail?
     2.  how to solve it?

pkgsrc doesn't fail because the target already exists, therefore it is
not "rebuilt".

I think the easiest way to solve this right now would be to do the
following:
  o removing the definition of WRKSRC
  o adding a post-extract target that does the following:

post-extract:
	${MV} ${WRKDIR}/vmpsd ${WRKSRC}

--=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.

--ptFpZ2xYd+337/mr
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iQEVAwUBQqRoEdgoQloHrPnoAQJK5wf/V4vdd5yGDG8Oh+xWunDevQhLP0YP0X5N
uPNBwz/uzvSZEgDX3Gs7+hQ+NFbSgSakuSAbWJzr9pVu/wlgZQXbiIbIukXxGXmH
bfvoENONlQx8iV43LnwVBF0q6qwBQ7oZGjbxp3WUbjKQ0vwXbJA/hp0sLmiLpwzP
Nb6PWP7JXbEiXa+dFF7AAChUXy2Lh12qp1qFj0zmRat53JmTew6iWjnz75C9wKbI
SI0OoGCOlzoIiJ+RXZEreeiPXVnGRGh+Dr5qhUErfupgHF7eRr80ZB7RICQoJ6c2
xEmhvpHzr4IQeIWG6R1DPKWEFgaRknb/rjszjFVM3ufMwP2Wo5ISxg==
=be3F
-----END PGP SIGNATURE-----

--ptFpZ2xYd+337/mr--