Date: Sat, 11 Oct 2003 22:34:29 +0200 From: Clement Laforet <sheepkiller@cultdeadsheep.org> To: ports@FreeBSD.org Subject: [patch] Call for testers: make CONFLICTS "prefix free" Message-ID: <20031011223429.23ceb18b.sheepkiller@cultdeadsheep.org>
next in thread | raw e-mail | index | archive | help
Hi guys ! Oliver Eikemeier has made an excellent job. Listing all conflicting ports is very good idea, but currently CONFLICTS doesn't considers PREFIX. Ports don't conflict if they are installed in different locations ! I tested this patch with apache and INN, and before submiting a PR, I'd rather get some feedback. regards, clem Index: bsd.port.mk =================================================================== RCS file: /WORK/REPO/ports/Mk/bsd.port.mk,v retrieving revision 1.468 diff -u -r1.468 bsd.port.mk --- bsd.port.mk 3 Sep 2003 19:50:24 -0000 1.468 +++ bsd.port.mk 11 Oct 2003 20:21:24 -0000 @@ -2990,15 +2990,25 @@ .endfor @if [ -s ${WRKDIR}/.CONFLICTS ]; then \ found=`cat ${WRKDIR}/.CONFLICTS | ${SED} -e s'|${PKG_DBDIR}/||g' | tr '\012' ' '`; \ - ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ + conflicting=0; \ + ${ECHO_MSG} "===> ${PKGNAME} may conflict with installed package(s): "; \ for entry in $$found; do \ - ${ECHO_MSG} " $$entry"; \ + ${ECHO_MSG} -n " $$entry:"; \ + prfx=`${PKG_INFO} -q -p $${entry} 2> /dev/null | ${HEAD} -n 1 | ${SED} -ne '1s|^@cwd ||p'`; \ + if [ "x$${PREFIX}" = "x$${prfx}" ]; then \ + conflicting=1;\ + ${ECHO_MSG} " yes.";\ + else \ + ${ECHO_MSG} " no.";\ + fi;\ done; \ ${ECHO_MSG}; \ + if [ "x$${conflicting}" = "x1" ] ; then \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \ ${RM} -f ${WRKDIR}/.CONFLICTS; \ exit 1; \ + fi ;\ fi .endif # CONFLICTS .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031011223429.23ceb18b.sheepkiller>