Date: Tue, 7 Nov 2000 14:42:53 +0800 From: Calvin NG <calvinng@brel.com> To: freebsd-stable@freebsd.org Subject: pkg_version does not work for ports that add -gtk suffix Message-ID: <20001107144253.C14453@brel.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001107144253.C14453>
