Date: Sun, 10 Oct 1999 03:40:42 -0700 (PDT) From: asami@cs.berkeley.edu (Satoshi Asami) To: ports@freebsd.org Subject: preserving +REQUIRED_BY across FORCE_PKG_REGISTER Message-ID: <199910101040.DAA06600@silvia.hip.berkeley.edu>
next in thread | raw e-mail | index | archive | help
What do people think about this one? You can now set FORCE_PKG_REGISTER and still have the +REQUIRED_BY file preserved. (I'm using cat and rm instead of mv for the off chance that someone may have installed another port between the creation of ${PKG_DBDIR}/${PKGNAME} and the +REQUIRED_BY restoration...it's probably not necessary.) -PW ------- Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.322 diff -u -r1.322 bsd.port.mk --- bsd.port.mk 1999/10/02 04:12:33 1.322 +++ bsd.port.mk 1999/10/10 07:45:02 @@ -2594,7 +2594,11 @@ .if !target(fake-pkg) fake-pkg: @if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi + @${RM} -f /tmp/${PKGNAME}-required-by .if defined(FORCE_PKG_REGISTER) + @if [ -e ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY ]; then \ + ${CP} ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY /tmp/${PKGNAME}-required-by; \ + fi @${RM} -rf ${PKG_DBDIR}/${PKGNAME} .endif @if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \ @@ -2623,6 +2627,10 @@ fi; \ fi; \ done; \ + fi + @if [ -e /tmp/${PKGNAME}-required-by ]; then \ + ${CAT} /tmp/${PKGNAME}-required-by >> ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \ + ${RM} -f /tmp/${PKGNAME}-required-by; \ fi .endif 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?199910101040.DAA06600>