From owner-freebsd-ports@FreeBSD.ORG Mon Jul 14 07:46:37 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FAC637B401 for ; Mon, 14 Jul 2003 07:46:37 -0700 (PDT) Received: from web9606.mail.yahoo.com (web9606.mail.yahoo.com [216.136.129.185]) by mx1.FreeBSD.org (Postfix) with SMTP id 070FE4400B for ; Mon, 14 Jul 2003 07:45:17 -0700 (PDT) (envelope-from chancedj@yahoo.com) Message-ID: <20030714144516.74977.qmail@web9606.mail.yahoo.com> Received: from [66.14.253.21] by web9606.mail.yahoo.com via HTTP; Mon, 14 Jul 2003 07:45:16 PDT Date: Mon, 14 Jul 2003 07:45:16 -0700 (PDT) From: Daryl Chance To: Tim Kellers In-Reply-To: <20030714100030.E26064@mts-128.wallnet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: ports@freebsd.org Subject: Re: portupgrade/make install problem. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: chancedj@yahoo.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2003 14:46:37 -0000 Thanks. I just saw the posts in the archive, but not a patch like Mr Edenfield posted. I would like to propose a patch of my own. Yours looks like it would work well, but it negates the FORCE_PKG_REGISTER env and NO_PKG_REGISTER env (If I follow the code correctly). My patch just modifies the pkg_info command to only add -O if the OSVERSION >= 470000. It's not tested since I don't know the language syntax for whever code that is :). So please, feel free to fix it. --- bsd.port.mk Sun Jul 13 01:12:48 2003 +++ bsd.port.mk.new Mon Jul 14 10:45:12 2003 @@ -3007,9 +3007,13 @@ .if !target(check-already-installed) check-already-installed: -.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) - @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed" - @already_installed=`${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null`; \ +.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER); then \ + @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed"; \ + .if ${OSVERSION} >= 470000; then \ + @already_installed=`${PKG_INFO} -q -O ${PKGORIGIN} 2> /dev/null`; \ + else + @already_installed=`${PKG_INFO} -q ${PKGORIGIN} 2> /dev/null`; \ + fi; \ if [ -n "$${already_installed}" ]; then \ for p in $${already_installed}; do \ prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -e 's|^@cwd ||'`; \ If I misread the code, I apologize. --- Tim Kellers wrote: > > Same problem I reported July 12, but with only one > of my machines (a > pentium I router/fileserver). the other three boxes > I built from the same > cvs update (7/11/2003) don't have the problem. > > FORCE_PKG_REGISTER="yes" gets me around the pronlem > in both make and > portupgrade (using the -m switch), but it's still > puzzling as all get out. > > Sorry you have the same problem, but, at least its > better to not go crazy, > alone. :-) > > Tim Kellers > CPE/NJIT > > On Mon, 14 Jul 2003, Daryl Chance wrote: > > > I seem to be having a problem with the ports > > collection. I'm trying to upgrade some ports on > one > > of my boxes using portupgrade and also trying to > just > > do a make reinstall on an up to date port and get > the > > following error each time: > > > > ===> Generating temporary packing list > > ===> Checking if sysutils/portupgrade already > > installed > > *** Error code 1 > > > > Stop in /usr/ports/sysutils/portupgrade. > > *** Error code 1 > > > > Stop in /usr/ports/sysutils/portupgrade. > > > > > > I'm running FBSD 4.6.1 and have used portupgrade > > succesfully quite a few times. This may or may > not be > > the problem, but I thought I'd bring it up. I > also > > did a make -d A install and I think I got more > info on > > what's happening (where it's erroring). > > > > Should I not be using portupgrade on anything less > > then 5.x? Or is it something else that's causing > the > > problem? > > > > echo "===> Checking if sysutils/portupgrade > already > > installed" > > ===> Checking if sysutils/portupgrade already > > installed > > already_installed=`/usr/sbin/pkg_info -q -O > > sysutils/portupgrade 2> /dev/null`; if [ -n > > "${already_installed}" ]; then for p in > > ${already_installed}; do pr > > fx=`/usr/sbin/pkg_info -q -p ${p} 2> /dev/null | > > /usr/bin/sed -e 's|^@cwd ||'`; if [ "x/usr/local" > = > > "x${prfx}" ]; then df=`/usr/sbin/pkg_info -q -f > ${p} > > 2> > > /dev/null | /usr/bin/grep -v "^@" | /usr/bin/comm > -12 > > - > /usr/ports/sysutils/portupgrade/work/.PLIST.mktmp`; > > if [ -n "${df}" ]; then found_package=${p}; br > > eak; fi; fi; done; fi; if [ -d > > /var/db/pkg/portupgrade-20030427 -o -n > > "${found_package}" ]; then if [ -d > > /var/db/pkg/portupgrade-20030427 ]; then echo > > "===> portupgrade-20030427 is already > installed"; > > else echo "===> An older version of > > sysutils/portupgrade is already installed > > (${found_package})"; fi > > ; echo " You may wish to \`\`make > deinstall'' > > and install this port again"; echo " by > \`\`make > > reinstall'' to upgrade it properly."; echo " > > If you really wish to overwrite the old port of > > sysutils/portupgrade"; echo " without > deleting > > it first, set the variable > \"FORCE_PKG_REGISTER\""; > > echo > > " in your environment or the \"make > install\" > > command line."; exit 1; fi > > *** Error code 1 > > > > Stop in /usr/ports/sysutils/portupgrade. > > > > > > The ports are in sync as of about 8:30 this > morning. > > > > __________________________________ > > Do you Yahoo!? > > SBC Yahoo! DSL - Now only $29.95 per month! > > http://sbc.yahoo.com > > _______________________________________________ > > freebsd-ports@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > > To unsubscribe, send any mail to > "freebsd-ports-unsubscribe@freebsd.org" > > > > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com