Date: Tue, 15 Jul 2003 17:09:41 +0200 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: Joe Marcus Clarke <marcus@marcuscom.com> Cc: portmgr@freebsd.org Subject: Re: Major flaws of the new make deinstall code Message-ID: <3F141935.7020706@fillmore-labs.com> In-Reply-To: <1058210907.299.82.camel@gyros> References: <20030714165358.GC2875@vega.vega.com> <1058208499.299.80.camel@gyros> <1058210907.299.82.camel@gyros>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe Marcus Clarke wrote: > --- /usr/ports/Mk/bsd.port.mk Sat Jul 12 15:01:17 2003 > +++ bsd.port.mk Mon Jul 14 15:00:02 2003 > @@ -3012,7 +3012,7 @@ > @already_installed=`${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null`; \ > if [ -n "$${already_installed}" ]; then \ > for p in $${already_installed}; do \ > - prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -e 's|^@cwd ||'`; \ > + prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${HEAD} -n 1 | ${SED} -e 's|^@cwd ||'`; \ > if [ "x${PREFIX}" = "x$${prfx}" ]; then \ > df=`${PKG_INFO} -q -f $${p} 2> /dev/null | ${GREP} -v "^@" | ${COMM} -12 - ${TMPPLIST}`; \ > if [ -n "$${df}" ]; then \ > @@ -3403,7 +3403,7 @@ > for p in $${found_names}; do \ > check_name=`${ECHO} $${p} | ${SED} -e 's/-[^-]*$$//'`; \ > if [ "$${check_name}" = "${PKGBASE}" ]; then \ > - prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -e 's|^@cwd ||'`; \ > + prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${HEAD} -n 1 | ${SED} -e 's|^@cwd ||'`; \ > if [ "x${PREFIX}" = "x$${prfx}" ]; then \ > ${ECHO_MSG} "===> Deinstalling $${p}"; \ > ${PKG_DELETE} -f $${p}; \ You could use ${SED} -ne '1 s|^@cwd ||p' instead of ${HEAD} -n 1 | ${SED} -e 's|^@cwd ||' Regards Oliver
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F141935.7020706>