From nobody@FreeBSD.org  Fri Mar  9 11:39:10 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D657116A401
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 Mar 2007 11:39:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id BE57013C461
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  9 Mar 2007 11:39:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l29BdAuk040835
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 9 Mar 2007 11:39:10 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l29BdANv040834;
	Fri, 9 Mar 2007 11:39:10 GMT
	(envelope-from nobody)
Message-Id: <200703091139.l29BdANv040834@www.freebsd.org>
Date: Fri, 9 Mar 2007 11:39:10 GMT
From: Simon Phoenix<phoenix.lists@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: portmaster 1.15 bug in find_and_delete_distfiles function
X-Send-Pr-Version: www-3.0

>Number:         110125
>Category:       ports
>Synopsis:       portmaster 1.15 bug in find_and_delete_distfiles function
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 09 11:40:10 GMT 2007
>Closed-Date:    Fri Mar 09 17:25:07 GMT 2007
>Last-Modified:  Fri Mar  9 17:30:03 GMT 2007
>Originator:     Simon Phoenix
>Release:        6.2-STABLE
>Organization:
Phoenix Lab.
>Environment:
FreeBSD sp0-host.lan 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Feb 10 22:05:58 EET 2007     phoenix@sp0-host.lan:/usr/obj/usr/src/sys/PHOENIX  i386
>Description:
Little bug in find_and_delete_distfiles function in portmaster 1.15.
When portmaster find and delete disfiles i have this message:

[...]
install-info --quiet /usr/local/info/standards261.info /usr/local/info/dir
===>   Compressing manual pages for autoconf-2.61
===>   Registering installation for autoconf-2.61
===>  Cleaning for autoconf-2.61

===>>> Upgrade for devel/autoconf261 to autoconf-2.61 succeeded
[: grep: unexpected operator
===>>> Delete autoconf-000227.tar.bz2? [n]
[: grep: unexpected operator
===>>> Delete autoconf-2.53.tar.bz2? [n]
[...]

More detailed report (with set -vx in bash):
+ [ ! -d autoconf-2.53.tar.bz2 ]
+ grep -q (autoconf-2.53.tar.bz2) /tmp/DI-FILES-5309.3yIGg13X
+ [ -n  ]
+ echo -n ===>>> Delete autoconf-2.53.tar.bz2? [n]
===>>> Delete autoconf-2.53.tar.bz2? [n] + read DELORNOT

+ [ ! -d autoconf-2.59.tar.bz2 ]
+ grep -q (autoconf-2.59.tar.bz2) /tmp/DI-FILES-5309.3yIGg13X
+ [ -n  ]
+ echo -n ===>>> Delete autoconf-2.59.tar.bz2? [n]
===>>> Delete autoconf-2.59.tar.bz2? [n] + read DELORNOT
>How-To-Repeat:
Just try update software.
>Fix:
Fix find_and_delete_distfiles function with patch.
(Sorry, I can't attach patch, I just paste it here.)

--- /usr/local/sbin/portmaster	Fri Mar  9 05:13:00 2007
+++ /usr/home/phoenix/projects/patches/portmaster	Fri Mar  9 13:07:00 2007
@@ -684,7 +684,7 @@
 			continue	# Do not delete current version
 			;;
 		*)	[ ! -d "$file" ] || continue
-			[ grep -q \(${file}\) $DI_FILES ] && continue
+			grep -q \(${file}\) $DI_FILES && continue
 
 			if [ -n "$ALWAYS_SCRUB_DISTFILES" ]; then
 				echo "===>>> Deleting stale distfile: $file"

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->dougb 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri Mar 9 13:11:36 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer/author 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110125 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Fri Mar 9 17:23:33 UTC 2007 
State-Changed-Why:  

You are of course correct. I fixed this locally, but forgot 
to merge the fix over. Thanks for catching this, and for 
reporting it. 

Doug 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110125 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/110125: commit references a PR
Date: Fri,  9 Mar 2007 17:22:59 +0000 (UTC)

 dougb       2007-03-09 17:22:51 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ports-mgmt/portmaster Makefile 
     ports-mgmt/portmaster/files portmaster.sh.in 
   Log:
   Fix a test in find_and_delete_distfiles() introduced in the last
   commit that I forgot to merge from my devel version.
   
   PR:             ports/110125
   Submitted by:   Simon Phoenix<phoenix.lists@gmail.com>
   
   Revision  Changes    Path
   1.17      +1 -1      ports/ports-mgmt/portmaster/Makefile
   1.16      +2 -2      ports/ports-mgmt/portmaster/files/portmaster.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
