Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Nov 2002 09:34:54 -0800
From:      Eric Melville <eric@FreeBSD.org>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        ports@FreeBSD.org
Subject:   Re: HEADS UP: pkg-comment coming back (for now)
Message-ID:  <20021110093454.C14426@FreeBSD.org>
In-Reply-To: <20021109031511.GC28558@rot13.obsecurity.org>; from kris@obsecurity.org on Fri, Nov 08, 2002 at 07:15:12PM -0800
References:  <20021109031511.GC28558@rot13.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> There were a number of problems with the recently committed patch to
> allow the pkg-comment file to be replaced by a PORTCOMMENT variable in
> the makefile.  Some of these have been addressed by (uncommitted)
> patches from several developers, but there remain a number of serious
> problems.
> 
> Since this issue is holding up the release of the 5.0 Developer
> Preview #2 release (and thereby 5.0-RELEASE), these changes will be
> backed out until the bsd.port.mk patch can be made to work correctly
> in all cases.  Sorry for the cvsup spam, folks.

I'm told this should stay out for the time being, but it wouldn't hurt to
try out this patch with any strings currently found in pkg-comment files
and report breakage. The patch sure isn't pretty, but I haven't seen any
problems so far.

--- /usr/ports/Mk/bsd.port.mk	Sat Nov  2 21:43:49 2002
+++ bsd.port.mk	Fri Nov  8 20:26:14 2002
@@ -1257,7 +1257,7 @@
 .if exists(${COMMENT})
 PKG_ARGS=		-v -c ${COMMENT} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
 .else
-PKG_ARGS=		-v -c -"${PORTCOMMENT}" -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
+PKG_ARGS=		-v -c ${WRKDIR}/comment -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
 .endif
 .if exists(${PKGINSTALL})
 PKG_ARGS+=		-i ${PKGINSTALL}
@@ -2415,6 +2415,7 @@
 		fi; \
 	fi
 	@__softMAKEFLAGS='${__softMAKEFLAGS:S/'/'\''/g}'; \
+	${MAKE} -V PORTCOMMENT > ${WRKDIR}/comment; \
 	if ${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; then \
 		if [ -d ${PACKAGES} ]; then \
 			eval ${MAKE} $${__softMAKEFLAGS} package-links; \
@@ -3351,16 +3352,16 @@
 
 .if !target(describe)
 describe:
-	@${ECHO_CMD} "`perl -e ' \
+	@${ECHO_CMD} "`${MAKE} -V PORTCOMMENT | perl -e ' \
 		print q{${PKGNAME}|${.CURDIR}|${PREFIX}|}; \
 		if (open(COMMENT, q{${COMMENT}})) { \
 			$$_ = <COMMENT>; \
 			chomp; \
 			print; \
-		} elsif (not // =~ q{${PORTCOMMENT}}) { \
-			print q{${PORTCOMMENT}}; \
 		} else { \
-			print q{** No Description}; \
+			$$_ = <>; \
+			chomp; \
+			print $$_ || q{** No Description}; \
 		} \
 		if ( -f q{${DESCR}} ) { \
 			print q{|${DESCR}}; \
@@ -3561,12 +3562,13 @@
 	@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
 		${ECHO_MSG} "===>   Registering installation for ${PKGNAME}"; \
 		${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
+		${MAKE} -V PORTCOMMENT > ${WRKDIR}/comment; \
 		${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
 		${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \
 		if [ -f ${COMMENT} ]; then \
 			${CP} ${COMMENT} ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
 		else \
-			${ECHO_CMD} ${PORTCOMMENT} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
+			${MAKE} -V PORTCOMMENT > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
 		fi; \
 		if [ -f ${PKGINSTALL} ]; then \
 			${CP} ${PKGINSTALL} ${PKG_DBDIR}/${PKGNAME}/+INSTALL; \

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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