Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  7 Nov 2000 14:24:48 +0800 (SGT)
From:      root@talentq.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/22659: pkg_version does not work for ports that add -gtk suffix
Message-ID:  <20001107062448.4E4BFB1@hobbits.int.talentq.com>

next in thread | raw e-mail | index | archive | help

>Number:         22659
>Category:       ports
>Synopsis:       pkg_version does not work for ports that add -gtk suffix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 06 22:30:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Calvin NG
>Release:        FreeBSD 4.2-BETA i386
>Organization:
<Organization>
>Environment:

	

>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.

>How-To-Repeat:


>Fix:

	A simple workaround will be to strip the -gtk suffix 
	when doing comparison.  A suggested (unified) patch that 
	works on my machine is as follows:

--- 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";
     }

     # Having figured out what to print, now determine, based on the


>Release-Note:
>Audit-Trail:
>Unformatted:


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?20001107062448.4E4BFB1>