Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2001 12:50:04 -0700 (PDT)
From:      Peter Pentchev <roam@orbitel.bg>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/27707: Bogus make errors while executing pkg_version -v
Message-ID:  <200105281950.f4SJo4c99335@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/27707; it has been noted by GNATS.

From: Peter Pentchev <roam@orbitel.bg>
To: Anton Berezin <tobez@tobez.org>
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 = <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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105281950.f4SJo4c99335>