Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 2009 11:38:41 +0200
From:      Nick Hibma <nick@van-laarhoven.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/137958: portupgrade fails with recursive dependency error
Message-ID:  <1Mdhcv-ITY-00@hind.van-laarhoven.org>
Resent-Message-ID: <200908190940.n7J9e3rV023906@freefall.freebsd.org>

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

>Number:         137958
>Category:       ports
>Synopsis:       portupgrade fails with recursive dependency error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 19 09:40:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Nick Hibma
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
AnyWi Technologies
>Environment:
System: FreeBSD hind.van-laarhoven.org 7.2-STABLE FreeBSD 7.2-STABLE #6 r196180:196225M: Mon Aug 17 14:28:06 CEST 2009 root@hind.van-laarhoven.org:/usr/obj/usr/src/sys/HIND i386


>Description:

On building many ports portinstall fails with a recursive dependency error.
Knowing my habit of fiddling with everything, the recursiveness is probably my
fault. But I can't find it and that prevents me from using portupgrade to
upgrade my ports because portinstall raises an exception on finding it.

I've changed two things:

- Added printing of the parent we are researching for its dependencies. The
  dot sometimes is confusing as some 'simple' ports still depend on lots of
  stuff, because of depending on a port that has lots of children.

- On finding a an origin that is already on the list, skip adding its children
  to the list. This is done in a hackish way but works here.

>How-To-Repeat:

Well, that I don't know!

>Fix:

--- work/pkgtools-2.4.6/bin/portupgrade	2009-08-19 11:23:58.000000000 +0200
+++ /usr/local/sbin/portupgrade	2009-08-19 11:21:40.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#!/usr/local/bin/ruby18
 # -*- ruby -*-
 #
 # Copyright (c) 2000-2004 Akinori MUSHA
@@ -848,8 +848,10 @@
       parents_list = Set.new
       STDERR.print "[Gathering depends for #{origin} "
       first = true
+    else
+      STDERR.print "(#{origin})"
     end
-    raise RecursiveDependencyError if parents_list.include?(origin)
+    unless parents_list.include?(origin)
     parents_list.add(origin)
 
     make_env = get_make_env(origin)
@@ -867,6 +870,7 @@
 	  depends.add($portsdb.strip(dep)) if !dep.empty?
 	end
     end
+    end
 
     STDERR.print '.'*depends.length if depends.length > 0
 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1Mdhcv-ITY-00>