Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2005 08:34:13 -0800 (PST)
From:      "Michael C. Shultz" <ringworm01@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Gerard Seibert <gerard@seibercom.net>, "Ricardo A. Reis" <ricardo@dis.epm.br>
Subject:   ports/89424: [MAINTAINER] update sysutils/portmanager
Message-ID:  <20051122163413.6AB4D130C21@ringworm.mechee.com>
Resent-Message-ID: <200511221650.jAMGoItV063933@freefall.freebsd.org>

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

>Number:         89424
>Category:       ports
>Synopsis:       [MAINTAINER] update sysutils/portmanager
>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:   Tue Nov 22 16:50:18 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Michael C. Shultz
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD ringworm.mechee.com 5.4-STABLE FreeBSD 5.4-STABLE #0: Fri Nov 4 06:35:37 PST 2005 root@ringworm.mechee.com:/usr5/obj/usr5/src/sys/RINGWORM5 i386


>Description:

	update sysutils/portmanager to 0.3.8_2

	1. Had to disable automatic timeouts until I learn how to properly close then open stdin.
	0.3.8_1 will seg fault upon a second timeout and 0.3.8 leaves these random errors:

	awk: i/o error occurred while closing /dev/stdin input record number

	Note to comitter: adds files/patch-0.3.8_2

>How-To-Repeat:

	N/A

>Fix:

--- portmanager-0.3.8_2.diff begins here ---
diff -ruN portmanager/Makefile portmanager-0.3.8_2/Makefile
--- portmanager/Makefile	Mon Nov 21 17:02:17 2005
+++ portmanager-0.3.8_2/Makefile	Tue Nov 22 08:25:22 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	portmanager
 PORTVERSION=	0.3.8
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	http://portmanager.sunsite.dk/distfiles/ \
 		${MASTER_SITE_SOURCEFORGE}
diff -ruN portmanager/files/patch-0.3.8_2 portmanager-0.3.8_2/files/patch-0.3.8_2
--- portmanager/files/patch-0.3.8_2	Wed Dec 31 16:00:00 1969
+++ portmanager-0.3.8_2/files/patch-0.3.8_2	Tue Nov 22 08:24:56 2005
@@ -0,0 +1,97 @@
+diff -ruN ../0.3.8_1/libMGPM/src/MGPMrGetPortName.c ./libMGPM/src/MGPMrGetPortName.c
+--- ../0.3.8_1/libMGPM/src/MGPMrGetPortName.c	Mon Nov 21 15:18:23 2005
++++ ./libMGPM/src/MGPMrGetPortName.c	Tue Nov 22 08:18:39 2005
+@@ -78,7 +78,9 @@
+ 				"%s %s is no longer in the ports collection, see /usr/ports/MOVED\nthis port must be removed for portmanager to continue\nis it OK to remove %s from your system? (yes/no/auto yes to all) [y/n/a] [y]\n",
+ 				portName, portDir, portName );
+ 			fprintf( stdout, "%s\n", SINGLE_LINES );
++/*
+ 			fprintf( stdout, "Will timeout after 5 minutes and default to [Y] if no selection is made\n" );
++*/
+ 			while( fflush( stdout ) );
+ 
+ 			if( property->autoMoved == 0 )
+@@ -86,9 +88,11 @@
+ 				/*
+ 				 * set timeout default to Y
+ 				 */
++/*
+ 				property->timeOut = 0;
+ 				signal( SIGALRM, MGPMrTimer );
+-				alarm( 300 );	/* time out in 5 minutes */
++				alarm( 300 );
++*/
+ 				answer	= getc(stdin);
+ 				
+ 				switch(answer)
+@@ -156,18 +160,11 @@
+ 				/*
+ 				 * reset alarm, reopen stdin after timeout
+ 				 */
+-				alarm(0);
+ /*
+-				stdinFileDescriptorIdx		= 0;
+-				while( ( stdinFileDescriptor = open( "/dev/tty", O_RDWR ) ) != -1 && stdinFileDescriptorIdx < 10000 )
+-				{
+-					printf( "open( /dev/tty ) retry %d of 100\n", stdinFileDescriptorIdx );
+-					stdinFileDescriptorIdx++;
+-				}
+-				stdin = fdopen( stdinFileDescriptor, "r" );
+-*/
+-				stdin = fdopen( 0, "r" );
++				alarm(0);
++				stdin = fdopen( fileno(stdin), "r" );
+ 				property->timeOut	= 0;
++*/
+ 				MGPMlogAdd( property, "installed ", portName,
+ 					" removed from system after 5 minute timeout:  no longer in ports tree: see /usr/ports/MOVED", " ", " " );
+ 			}
+diff -ruN ../0.3.8_1/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
+--- ../0.3.8_1/libMGPM/src/MGPMrUpdate.c	Mon Nov 21 15:18:23 2005
++++ ./libMGPM/src/MGPMrUpdate.c	Tue Nov 22 08:17:51 2005
+@@ -612,18 +612,21 @@
+ 					if( stinker )
+ 					{
+ 						fprintf( stdout, "OK to remove conflicting port %s Yy/Nn/Aa [Y]\?\n", localProperty.installedPortName );
++/*
+ 						fprintf( stdout, "Will timeout after 5 minutes and default to [Y] if no selection is made\n" );
++*/
+ 						while( fflush( stdout ) );
+ 						if( property->autoConflicts == 0 )
+ 						{
+ 							/*
+ 							 * set timeout default to Y
+ 							 */
++/*							 
+ 							property->timeOut = 0;
+ 							signal( SIGALRM, MGPMrTimer );
+-							alarm( 300 );	/* time out in 5 minutes */
++							alarm( 300 );
++*/
+ 							answer	= getc(stdin);
+-
+ 							switch(answer)
+ 							{
+ 								case KEY_ENTER:
+@@ -694,18 +697,11 @@
+ 							/*
+ 							 * reset alarm, reopen stdin after timeout
+ 							 */
+-							alarm(0);
+ /*
+-							stdinFileDescriptorIdx		= 0;
+-							while( ( stdinFileDescriptor = open( "/dev/tty", O_RDWR ) ) != -1 && stdinFileDescriptorIdx < 10000 )
+-							{
+-								printf( "open( /dev/tty ) retry %d of 100\n", stdinFileDescriptorIdx );
+-								stdinFileDescriptorIdx++;
+-							}
+-							stdin = fdopen( stdinFileDescriptor, "r" );
+-*/
+-							stdin = fdopen( 0, "r" );
++							alarm(0);
++							stdin = fdopen( fileno(stdin), "r" );
+ 							property->timeOut	= 0;
++*/
+ 							MGPMlogAdd( property, "conflicting installed ", localProperty.installedPortName,
+ 								" removed from system after 5 minute timeout: conflicted with ", oldPortName, " " );
+ 						}
--- portmanager-0.3.8_2.diff ends here ---


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



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