Subject: config.status.overriden on solaris
To: None <tech-pkg@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-pkg
Date: 02/25/2004 22:49:46
--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
I've sorted one of the problems I have with pkgsrc-current on solaris:
===> Building for kdelibs-3.2.0
cd . && /bin/ksh ./config.status Makefile
./config.status[14]: .: recursion too deep
gmake: *** [Makefile] Error 1
*** Error code 2
./config.status is a wrapper that check for --recheck before calling
the real config.status with
. config.status.overridden
For at last some packages, config.status.overridden checks if LINENO is
working properly, and if it's not it looks for a shell that can deal with it.
2 problems:
- With solaris's /bin/sh, LINENO is stuck at 14 in config.status.overridden,
which is the line number at which it was loaded in config.status.
- config.status.overridden still think it's name is config.status, so
it will load config.status again, with /bin/ksh as it's the value
of CONFIG_SHELL, and it passes config.status.overridden's test (which doesn't
use file inclusion). So we loop.
The attached patch fix both problems (config.status.overridden knows its
real name though argv[0], and LINENO works properly).
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--
--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="config.status.diff"
Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1412
diff -u -r1.1412 bsd.pkg.mk
--- bsd.pkg.mk 25 Feb 2004 09:24:52 -0000 1.1412
+++ bsd.pkg.mk 25 Feb 2004 21:15:34 -0000
@@ -2487,7 +2487,7 @@
${ECHO} 'case $$pkgsrc_override in'; \
${ECHO} 'yes) exit 0 ;;'; \
${ECHO} 'esac'; \
- ${ECHO} ". ${WRKSRC}/$$file.overridden"; \
+ ${ECHO} "${CONFIG_SHELL} ${WRKSRC}/$$file.overridden"; \
) > $$file; \
${CHMOD} +x $$file; \
fi; \
--qDbXVdCdHGoSgWSk--