diff options
author | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-22 17:38:20 +0000 |
---|---|---|
committer | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-11-22 17:38:20 +0000 |
commit | 72a98d91b4eaa24111d65213b7353bc1aa6671bd (patch) | |
tree | 878535a217ffa5107ce7edbac4e6eee5d5caf466 /ports-mgmt/portmanager | |
parent | Update to DAT 4634 (diff) |
Update to 0.3.8_2
* 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
PR: 89424
Submitted by: Michael C. Shultz <ringworm01@gmail.com> (maintainer)
Notes
Notes:
svn path=/head/; revision=149077
Diffstat (limited to 'ports-mgmt/portmanager')
-rw-r--r-- | ports-mgmt/portmanager/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portmanager/files/patch-0.3.8_2 | 97 |
2 files changed, 98 insertions, 1 deletions
diff --git a/ports-mgmt/portmanager/Makefile b/ports-mgmt/portmanager/Makefile index 8c0a97d0b689..91df00db6acf 100644 --- a/ports-mgmt/portmanager/Makefile +++ b/ports-mgmt/portmanager/Makefile @@ -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 --git a/ports-mgmt/portmanager/files/patch-0.3.8_2 b/ports-mgmt/portmanager/files/patch-0.3.8_2 new file mode 100644 index 000000000000..6349c849bf98 --- /dev/null +++ b/ports-mgmt/portmanager/files/patch-0.3.8_2 @@ -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, " " ); + } |