From root@minerva.uucp.kew.com  Tue Jul  3 16:46:55 2001
Return-Path: <root@minerva.uucp.kew.com>
Received: from minerva.uucp.kew.com (kendra.ne.mediaone.net [24.218.227.234])
	by hub.freebsd.org (Postfix) with ESMTP id EFFEB37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Jul 2001 16:46:54 -0700 (PDT)
	(envelope-from root@minerva.uucp.kew.com)
Received: by minerva.uucp.kew.com (Postfix, from userid 0)
	id E0C8ABA14; Tue,  3 Jul 2001 19:46:53 -0400 (EDT)
Message-Id: <20010703234653.E0C8ABA14@minerva.uucp.kew.com>
Date: Tue,  3 Jul 2001 19:46:53 -0400 (EDT)
From: ahd@kew.com
Reply-To: ahd@kew.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: pkg_update complains about missing REQUIRED_BY for port build packages
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         28680
>Category:       ports
>Synopsis:       pkg_update complains about missing REQUIRED_BY for port build packages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    paul
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 03 16:50:00 PDT 2001
>Closed-Date:    Wed Jun 05 16:34:33 PDT 2002
>Last-Modified:  Wed Jun 05 16:34:33 PDT 2002
>Originator:     Drew Derbyshire
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
Kendra Electronic Wonderworks, Stoneham MA 02180 (http://www.kew.com)
>Environment:
System: FreeBSD minerva.hh.kew.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Jun 23 09:50:15 EDT 2001 root@:/usr/scratch/obj/usr/src/sys/MINERVA i386


	
>Description:

	Invocation of pkg_update routine causes an error message
	reporting a missing +REQUIRED_BY file:

	    minerva,/usr/ports/textproc/ispell,123# make package
		.
		. 	(build runs)
		.
	    minerva,/usr/ports/textproc/ispell,123# pkg_update ispell-3.2.04_1.tgz
	    Updating ispell packages to version 3.2.04
	    Can't open /var/db/pkg/ispell-3.2.04/+REQUIRED_BY, No such file or
	    directory

	 This happens even if the same package is run twice in a
	 row (one would hope if the first pass cleanup encountered
	 an error, it was cleaned by the first pass install).

		    

>How-To-Repeat:
	
	Execute pkg_update on a port built package.

>Fix:

	Don't issue the error message if the +REQUIRED_BY is an optional
	component of the package database; otherwise, tweak the port
	build process to always create a +REQUIRED_BY component.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->portmgr 
Responsible-Changed-By: dwcjr 
Responsible-Changed-When: Sun Jul 8 19:41:53 PDT 2001 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28680 

From: Devin Kowatch <dkowatch@ucsd.edu>
To: freebsd-gnats-submit@FreeBSD.org, ahd@kew.com
Cc:  
Subject: Re: ports/28680: pkg_update complains about missing REQUIRED_BY for port build packages
Date: Thu, 16 Aug 2001 23:23:38 -0700

 The Given fix and cause of this problem are incorrect, but the problem is
 real.
 
 This problem surfaces when trying to upgrade a port with a PORTREVISION (or
 presumably a PORTEPOCH or letters in the version string).  The get_version
 function doesn't allow enough characters in the version string which has the
 effect of truncating the version string down to only PORTVERSION, which causes
 the open of the +REQUIRED_BY file to fail due to the fact that it's using an
 imcomplete version string to build the directory name.
 
 
 The fix is to change get_version so that it allows more characters in the
 version string.  A Patch against version 1.4.2.1 is below:
 ----------cut------------------
 
 --- pkg_update.pl.orig	Thu Aug 16 23:01:54 2001
 +++ pkg_update.pl	Thu Aug 16 23:06:57 2001
 @@ -51,7 +51,9 @@
  sub get_version($) {
  	my ($pkg) = @_;
  
 -	$pkg =~ /(.+)-([0-9\.]+)/;
 +    # letters shouldn't be in version names, but they are.
 +    # also a ',' and '_' are needed to cope with PORTREVISION and PORTEPOCH
 +	$pkg =~ /(.+)-([0-9A-Za-z_,\.]+)/;
  	if (! $2) {
  		return($pkg, "");
  	} else {
 ------------end--------------------
 -- 
 Devin Kowatch                 | dkowatch@ucsd.edu
                               | http://www.webengruven.org/
Responsible-Changed-From-To: portmgr->paul 
Responsible-Changed-By: sobomax 
Responsible-Changed-When: Tue Mar 26 00:26:05 PST 2002 
Responsible-Changed-Why:  
Over to the author/maintainer of pkg_update(1). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=28680 
State-Changed-From-To: open->closed 
State-Changed-By: paul 
State-Changed-When: Wed Jun 5 16:33:50 PDT 2002 
State-Changed-Why:  
This program is no longer supported. portupgrade should be used instead. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=28680 
>Unformatted:
