Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  7 Jan 2006 01:25:31 +0900 (JST)
From:      KOMATSU Shinichiro <koma2@lovepeers.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/91402: sysutils/portupgrade: Fix yet another infinite loop.
Message-ID:  <20060106162531.A6852114D0@koma2-45.wins.timedia.co.jp>
Resent-Message-ID: <200601061630.k06GU2i4003975@freefall.freebsd.org>

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

>Number:         91402
>Category:       ports
>Synopsis:       sysutils/portupgrade: Fix yet another infinite loop.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 06 16:30:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     KOMATSU Shinichiro
>Release:        FreeBSD 5.4-RELEASE-p8 i386
>Organization:
>Environment:
FreeBSD 5.4-RELEASE-p8 i386

>Description:

Check and avoid infinite loop when MOVED has an entry such as:

    games/scummvm|emulators/scummvm|2004-04-06|new category
    emulators/scummvm|games/scummvm|2004-04-13|new category

    (games/scummvm -> emulators/scummvm -> games/scummvm -> ...)

Reported by: Bohdan Horst <nexus at hoth dot amu dot edu dot pl>

>How-To-Repeat:
	
>Fix:

diff --exclude=*.log* --exclude=CVS -urN portupgrade.old/Makefile portupgrade/Makefile
--- portupgrade.old/Makefile	Sat Jan  7 01:20:31 2006
+++ portupgrade/Makefile	Sat Jan  7 01:19:14 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	portupgrade
 PORTVERSION=	2.0.1
-PORTREVISION=	0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://dists.lovepeers.org/distfiles/portupgrade/
diff --exclude=*.log* --exclude=CVS -urN portupgrade.old/files/patch-lib-portsdb.rb portupgrade/files/patch-lib-portsdb.rb
--- portupgrade.old/files/patch-lib-portsdb.rb	Thu Jan  1 09:00:00 1970
+++ portupgrade/files/patch-lib-portsdb.rb	Sat Jan  7 01:17:25 2006
@@ -0,0 +1,13 @@
+Index: lib/portsdb.rb
+===================================================================
+--- lib/portsdb.rb	(revision 74)
++++ lib/portsdb.rb	(revision 75)
+@@ -91,7 +91,7 @@
+       while true
+ 	if moved = @moved[me]
+ 	  t << moved if t.empty? or t.last.seq < moved.seq
+-	  if me.nil? or me == moved.to
++	  if me.nil? or t.map{|p| p.to}.include?(me)
+ 	    break
+ 	  else
+ 	    me = moved.to
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060106162531.A6852114D0>