From owner-freebsd-stable Mon Nov 6 22:42:58 2000 Delivered-To: freebsd-stable@freebsd.org Received: from hobbits.brel.com (hobbits.brel.com [203.127.231.61]) by hub.freebsd.org (Postfix) with ESMTP id 1220337B479 for ; Mon, 6 Nov 2000 22:42:56 -0800 (PST) Received: by hobbits.brel.com (Postfix, from userid 1001) id 1ECAD3328; Tue, 7 Nov 2000 14:42:53 +0800 (SGT) Date: Tue, 7 Nov 2000 14:42:53 +0800 From: Calvin NG To: freebsd-stable@freebsd.org Subject: pkg_version does not work for ports that add -gtk suffix Message-ID: <20001107144253.C14453@brel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greetings, Just send my first PR ever. Anyway, maybe we can slip this into 4.2?? Or is it too late? >Description: Recently, some of the the ports that define 'USE_GTK' adds the '-gtk' suffix to the package name/port name. This breaks the pkg_version utility as it cannot fine the portname/package in the INDEX file. > a simple workaround --- pkg_version-411 Thu Nov 2 13:23:14 2000 +++ pkg_version Tue Nov 7 14:14:36 2000 @@ -341,6 +341,9 @@ $packageNameVer = $packageString; $packageName = $currentPackages{$packageString}{'name'}; +### strip -gtk suffix + $packageName =~ s/-gtk$//; + $currentVersion = $currentPackages{$packageString}{'fullversion'}; if (defined $currentPackages{$packageString}{'portversion'}) { @@ -408,7 +411,7 @@ else { next if $ShowCommandsFlag; $versionCode = "?"; - $Comment = "unknown in index"; + $Comment = "$packageName unknown in index"; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message