From nobody@FreeBSD.org  Sat Feb  2 14:11:36 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 57CC137B419
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  2 Feb 2002 14:11:36 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g12MBaS54026;
	Sat, 2 Feb 2002 14:11:36 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200202022211.g12MBaS54026@freefall.freebsd.org>
Date: Sat, 2 Feb 2002 14:11:36 -0800 (PST)
From: Mike Beeler <info@netarmor.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_tarup-1.2_3 has invalid distinfo name preventing update to it and portupgrade-20020128
X-Send-Pr-Version: www-1.0

>Number:         34562
>Category:       ports
>Synopsis:       pkg_tarup-1.2_3 has invalid distinfo name preventing update to it and portupgrade-20020128
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    knu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 02 14:20:00 PST 2002
>Closed-Date:    Fri Feb 22 05:11:03 JST 2002
>Last-Modified:  Fri Feb 22 05:18:38 JST 2002
>Originator:     Mike Beeler
>Release:        4.4-R
>Organization:
NetArmor, Inc.
>Environment:
FreeBSD primus.netarmor.net 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC  i386
    
>Description:
Using CVSUP on a daily basis to maintain Ports tree. Resent change to misc/pkg_tarup to sysutils/pkg_tarup has created an update file name for pkg_tarup of "pkg_tarup?rev=1.2&content-type=text%2fplain".  Needless to say this file name does not exist.  Portupgrade-20020128 has a dependency on pkg_tarup. In short neither of these files will update due to error in pkg_tarup distribution file name.      
>How-To-Repeat:
Do CVSUP on the ports tree. Then "pkgdb -F and change stale dependency on pkg_tarup from misc\pkg_tarup to sysutils\pkg_tarup. Then do portupgrade -ra. The upgrade for both will fail. Its more evident if neither port is installed.  I made the mistake of thinking I could do a work around (as I have done may times before) of "pkg_remove pkg_tarup" and then reinstalling. Much to my surprise both pkg_tarup AND portupgrade were removed.

I then realized my error and went to my network server (I was working on my FreeBSD workstation when this was first discovered) and repeated but make the correction on the stale dependency for pkg_tarup correctly when running pkgdb-F (changed it to sysutils/pkg_tarup). Since pkg_tarup was still installed the subsequent portupgrade for portupgrade went smoothly.  But pkg_tarup will still not upgrade. 

On my workstation without pkgdb -F (removed when pkg_remove also removed portupgrade and pkg_tarup) I cannot correct the stale dependency for pkg_tarup. I cannot reinstall pkg_tarup because of the distribution file name problem and until pkg_tarup is fixed I cannot reinstall portupgrade which installs pkgdb.

Seems I'm in a catch 22 situation, at least with regard to my level of knowledge on CVSUP and local admin files and systems. 
>Fix:
Correct distribution file name error in CVS for the sysutils/pkg_tarup file.  Run CVSUP on ports distribution tree, check that the sysutils/pkg_tarup distinfo file contains correct pkg_tarup file name, reinstall pkg_tarup, then reinstall portupgrade, then run pkgdb -F and correct stale dependency on pkg_tarup.  I think???????
>Release-Note:
>Audit-Trail:

From: Garance A Drosehn <drosih@rpi.edu>
To: freebsd-gnats-submit@FreeBSD.org, info@netarmor.net
Cc: knu@FreeBSD.org
Subject: Re: ports/34562: pkg_tarup-1.2_3 has invalid distinfo name preventing update to it and portupgrade-20020128
Date: Sun, 3 Feb 2002 00:17:15 -0500

 I ran into this same problem with portupgrade referencing pkg_tarup, and 
 pkg_tarup (apparently?) having moved in the ports-tree.
 
 In my case, what I did was 'pkg_deinstall -f pkg_tarup', which 
 complained because it knew portupgrade wanted pkg_tarup, but it did it 
 anyway.  Then I assumed that the missing pkg_tarup would cause trouble 
 if I tried to run portupgrade, so I made pkg_tarup by hand:
 
     cd /usr/ports/sysutils/pkg_tarup
     make && make install && make clean
     /usr/local/sbin/pkgdb -F
 
 This seemed to fix up the pkg_tarup problems, on both my -current and 
 -stable systems.  I then tried to upgrade portupgrade itself, and I was 
 able to do that on my -current system, but I ran into a different set of 
 troubles in my -stable system.  My -stable system was last rebuilt on 
 Jan 24th (4.5-RC).
 
 The first problem is that /usr/ports/Mk/bsd.ruby.mk has a '.if' check on 
 RUBY_DEFAULT_VER (around 138, I think), but on my stable box it's 
 possible to hit that line with RUBY_DEFAULT_VER still being undefined.  
 I duplicated the line which sets that to 1.6 if it isn't already set.
 
 I then ran into a problem where "Building for portupgrade-20020128" runs 
 into an error of "make: don't know how to make configure.  Stop", while 
 it is in /usr/ports/sysutils/portupgrade/work/pkgtools-20020128.  
 Perhaps some other parts of bsd.ruby.mk are not getting setup correctly 
 in -stable (or at least, not in MY snapshot of -stable).  The same 
 problem happens if I try to do it by hand:
      cd /usr/ports/sysutils/portupgrade
      make
 
 Note that I had much better success on my -current system.  One I 
 corrected the pkg_tarup problem, and got around the ruby-uri problem as 
 mentioned in a different PR, portupgrade was able to upgrade itself 
 without hitting these problems.
 
 I have cvsup'ed the ports collection on both systems, several times over 
 the last two days, and I still can't rebuilt portupgrade on my stable 
 system.
 
 ---
 Garance Alistair Drosehn     =     gad@gilead.acs.rpi.edu
 Senior Systems Programmer           or     gad@FreeBSD.org
 Rensselaer Polytechnic Institute;           Troy NY    USA
 
Responsible-Changed-From-To: freebsd-ports->knu 
Responsible-Changed-By: petef 
Responsible-Changed-When: Thu Feb 7 20:37:01 PST 2002 
Responsible-Changed-Why:  
Over to maintainer 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34562 
State-Changed-From-To: open->closed 
State-Changed-By: knu 
State-Changed-When: Fri Feb 22 05:11:03 JST 2002 
State-Changed-Why:  
I don't think there is a distfile name problem with the pkg_tarup port, 
unless you are on 3-STABLE which has only old make(1) which doesn't 
understand the various modifiers introduced in 4.x. 

It is not clear from the PR, but I guess if the originator had run `pkgdb -F' 
before upgrading he wouldn't have seen the problem.  Stale origins should 
always be fixed with `pkgdb -F'. 

As for the not pretty distfile name problem, I'll revisit later and probably 
suggest introducing something like DISTRENAME in bsd.port.mk. 

Thanks for the report. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34562 
>Unformatted:
