Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Dec 2011 17:46:20 GMT
From:      David Naylor <naylor.b.david@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163063: [PATCH] fix for ports-mgmt/portbuilder
Message-ID:  <201112041746.pB4HkKBj086767@red.freebsd.org>
Resent-Message-ID: <201112041750.pB4Ho7CB086442@freefall.freebsd.org>

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

>Number:         163063
>Category:       ports
>Synopsis:       [PATCH] fix for ports-mgmt/portbuilder
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 04 17:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     David Naylor
>Release:        
>Organization:
>Environment:
>Description:
Retry kevent(2) if interrupted (by EINTR).
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -uNr /usr/ports/ports-mgmt/portbuilder/Makefile port/Makefile
--- /usr/ports/ports-mgmt/portbuilder/Makefile	2011-08-02 05:22:12.000000000 +0200
+++ port/Makefile	2011-12-04 19:44:46.000000000 +0200
@@ -2,11 +2,11 @@
 # Date created:				2011/04/03
 # Whom:					David Naylor <naylor.b.david@gmail.com>
 #
-# $FreeBSD: ports/ports-mgmt/portbuilder/Makefile,v 1.4 2011/08/01 16:37:02 zi Exp $
+# $FreeBSD: ports/ports-mgmt/portbuilder/Makefile,v 1.3 2011/07/25 01:40:44 zi Exp $
 
 PORTNAME=	portbuilder
 DISTVERSION=	0.1.3.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	http://cloud.github.com/downloads/DragonSA/portbuilder/
 
diff -uNr /usr/ports/ports-mgmt/portbuilder/files/patch-0001-8be91cc port/files/patch-0001-8be91cc
--- /usr/ports/ports-mgmt/portbuilder/files/patch-0001-8be91cc	1970-01-01 02:00:00.000000000 +0200
+++ port/files/patch-0001-8be91cc	2011-07-28 21:03:32.000000000 +0200
@@ -0,0 +1,11 @@
+--- libpb/builder.py
++++ libpb/builder.py
+@@ -425,7 +425,7 @@ class StageBuilder(Builder):
+         assert not port.dependency.check(self.stage)
+         del self._pending[port]
+         if self._port_check(port):
+-            assert port.stage == self.stage - 1
++            assert port.stage == self.stage - 1 or self.stage > Port.PACKAGE
+             self.update.emit(self, Builder.QUEUED, port)
+             self.ports[port].started.connect(self._started)
+             self.queue.add(self.ports[port])
diff -uNr /usr/ports/ports-mgmt/portbuilder/files/patch-0002-4cd8d40 port/files/patch-0002-4cd8d40
--- /usr/ports/ports-mgmt/portbuilder/files/patch-0002-4cd8d40	1970-01-01 02:00:00.000000000 +0200
+++ port/files/patch-0002-4cd8d40	2011-12-04 19:41:05.000000000 +0200
@@ -0,0 +1,28 @@
+--- libpb/event.py
++++ libpb/event.py
+@@ -3,6 +3,7 @@
+ Provides a framework for calling functions asynchronously."""
+ from __future__ import absolute_import
+ 
++import errno
+ import collections
+ import select
+ 
+@@ -157,7 +158,16 @@ class EventManager(object):
+ 
+     def _queue(self, timeout=None):
+         """Run any events returned by kqueue."""
+-        for ev in self._kq.control(None, 2, timeout):
++        while True:
++            # Retry self._kq_control if the system call was interrupted
++            try:
++                events = self._kq.control(None, 16, timeout)
++                break
++            except OSError, e:
++                if e.errno == errno.EINTR:
++                    continue
++                raise
++        for ev in events:
+             event = (ev.ident, ev.filter)
+             if event in self._kq_events:
+                 if (ev.filter == select.KQ_FILTER_PROC and
diff -uNr /usr/ports/ports-mgmt/portbuilder/files/patch-libpb_builder.py port/files/patch-libpb_builder.py
--- /usr/ports/ports-mgmt/portbuilder/files/patch-libpb_builder.py	2011-08-01 18:37:02.000000000 +0200
+++ port/files/patch-libpb_builder.py	1970-01-01 02:00:00.000000000 +0200
@@ -1,11 +0,0 @@
---- libpb/builder.py
-+++ libpb/builder.py
-@@ -425,7 +425,7 @@ class StageBuilder(Builder):
-         assert not port.dependency.check(self.stage)
-         del self._pending[port]
-         if self._port_check(port):
--            assert port.stage == self.stage - 1
-+            assert port.stage == self.stage - 1 or self.stage > Port.PACKAGE
-             self.update.emit(self, Builder.QUEUED, port)
-             self.ports[port].started.connect(self._started)
-             self.queue.add(self.ports[port])


>Release-Note:
>Audit-Trail:
>Unformatted:



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