From owner-freebsd-ports Mon May 28 12:50:11 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1DD0A37B424 for ; Mon, 28 May 2001 12:50:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4SJo4c99335; Mon, 28 May 2001 12:50:04 -0700 (PDT) (envelope-from gnats) Date: Mon, 28 May 2001 12:50:04 -0700 (PDT) Message-Id: <200105281950.f4SJo4c99335@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: ports/27707: Bogus make errors while executing pkg_version -v Reply-To: Peter Pentchev Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/27707; it has been noted by GNATS. From: Peter Pentchev To: Anton Berezin Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/27707: Bogus make errors while executing pkg_version -v Date: Mon, 28 May 2001 22:46:44 +0300 OK, let's get this into the GNATS audit-trail; comments inline. On Mon, May 28, 2001 at 09:26:42PM +0200, Anton Berezin wrote: > On Mon, May 28, 2001 at 10:08:02PM +0300, Peter Pentchev wrote: > > > OK, how about this: reporting the no-longer-existent directory, too? > > Almost. :-) "$PortsDirectory/$origin" is too long, and there is no > need for concatenation in the report line - the string interpolation > will do. Oh ok, I wondered if it could handle -> and such :) > Now, would you commit it, or shall we wait for Bruce's opinion? ;-) > > By the way, it will be necessary to add an extra sed line to > 400.status-pkg (see a smallish patch below the main patch). > > =Anton. > -- > May the tuna salad be with you. I don't think I have the karma to mess around the src/ tree :) I think we should wait for bmah or mharo to give their opinion. Other than that, your patch seems just fine to me :) G'luck, Peter -- I've heard that this sentence is a rumor. > Index: pkg_version.pl > =================================================================== > RCS file: /home/ncvs/src/usr.sbin/pkg_install/version/pkg_version.pl,v > retrieving revision 1.20 > diff -u -r1.20 pkg_version.pl > --- pkg_version.pl 2001/05/15 18:37:23 1.20 > +++ pkg_version.pl 2001/05/28 19:16:01 > @@ -373,7 +373,10 @@ > # Try to get the version out of the makefile. > # The chdir needs to be successful or our make -V invocation > # will fail. > - chdir "$PortsDirectory/$origin" or next; > + unless (chdir "$PortsDirectory/$origin" and -r "Makefile") { > + $currentPackages{$packageString}->{orphaned} = $origin; > + next; > + } > > open PKGNAME, "$GetPkgNameCommand|"; > $pkgname = ; > @@ -448,8 +451,15 @@ > $packageName = $currentPackages{$packageString}{'name'}; > > $currentVersion = $currentPackages{$packageString}{'fullversion'}; > + > + if ($currentPackages{$packageString}->{orphaned}) { > + > + next if $ShowCommandsFlag; > + $versionCode = "?"; > + $Comment = "orphaned: $currentPackages{$packageString}->{orphaned}"; > + > + } elsif (defined $currentPackages{$packageString}{'portversion'}) { > > - if (defined $currentPackages{$packageString}{'portversion'}) { > $portVersion = $currentPackages{$packageString}{'portversion'}; > > $portPath = "$PortsDirectory/$currentPackages{$packageString}{'origin'}"; > > > > > > > Index: 400.status-pkg > =================================================================== > RCS file: /home/ncvs/src/etc/periodic/weekly/400.status-pkg,v > retrieving revision 1.6 > diff -u -r1.6 400.status-pkg > --- 400.status-pkg 2001/04/28 16:15:50 1.6 > +++ 400.status-pkg 2001/05/28 19:25:05 > @@ -21,7 +21,8 @@ > -e '/^[^ ]*-\([^ ]*\) *\* *multiple versions.*[ ,]\1[,)].*/d' \ > -e 's/^\([^ ]*\) *\* *multiple versions.*\((.*\)/ \1 needs updating \2/p' \ > -e 's/^\(bsdpan-[^ ]*\) *? *unknown in index/ \1 may be outdated - check CPAN version manually/p' \ > - -e 's/^\([^ ]*-[^ ]*\) *? *unknown in index/ \1 is obsolete/p' | > + -e 's/^\([^ ]*-[^ ]*\) *? *unknown in index/ \1 is obsolete/p' \ > + -e 's/^\([^ ]*-[^ ]*\) *? *\(orphaned:.*\)$/ \1 was \2/p' | > tee /dev/stderr | > wc -l) > [ $rc -gt 1 ] && rc=1;; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message