Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2005 07:39:02 -0800 (PST)
From:      Mike <ringworm01@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/90283: [MAINTAINER] update sysutils/portmanager
Message-ID:  <20051212153902.BDF90B93F@FreeBSD70.mechee.com>
Resent-Message-ID: <200512121620.jBCGK3As090882@freefall.freebsd.org>

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

>Number:         90283
>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:   Mon Dec 12 16:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Michael C. Shultz
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD FreeBSD70.mechee.com 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Thu Dec 8 11:29:19 PST 2005 mike@FreeBSD70.mechee.com:/usr/obj/usr/src/sys/FREEBSD70 i386


>Description:

	update sysutils/portmanager to 0.4.0

	1. Reduces security flaws found with security/flawfinder from
	777 to 98 in source. 0.4.* releases will be dedicated to security
	and bug fixes

	2. Fixes bug where if portmanager is used to install portupgrade
	+CONTENTS files for portupgrade get corrupted

	Note to comitter: New tarball, please remove files/ and all patches

>How-To-Repeat:

	N/A

>Fix:

--- portmanager-0.4.0.diff begins here ---
diff -ruN portmanager/Makefile portmanager-0.4.0/Makefile
--- portmanager/Makefile	Sat Dec  3 22:16:40 2005
+++ portmanager-0.4.0/Makefile	Mon Dec 12 07:31:20 2005
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	portmanager
-PORTVERSION=	0.3.9
-PORTREVISION=	7
+PORTVERSION=	0.4.0
 CATEGORIES=	sysutils
 MASTER_SITES=	http://portmanager.sunsite.dk/distfiles/ \
 		${MASTER_SITE_SOURCEFORGE}
diff -ruN portmanager/distinfo portmanager-0.4.0/distinfo
--- portmanager/distinfo	Fri Nov 25 12:14:23 2005
+++ portmanager-0.4.0/distinfo	Mon Dec 12 07:17:13 2005
@@ -1,3 +1,3 @@
-MD5 (portmanager-0.3.9.tar.gz) = ced2fed7ba75a664f030f8d4bd72b976
-SHA256 (portmanager-0.3.9.tar.gz) = 34063846fbf86d16cf42a8f3aa4a37c522e6e234b314721f22dab391ca8aca69
-SIZE (portmanager-0.3.9.tar.gz) = 490606
+MD5 (portmanager-0.4.0.tar.gz) = 4d59ab82de1f593cfece1b2dd600f86e
+SHA256 (portmanager-0.4.0.tar.gz) = 088b0a393ffa31a5c67bfda3e298dd54c7039b09ee7dd636411d061b98efddd2
+SIZE (portmanager-0.4.0.tar.gz) = 491058
diff -ruN portmanager/files/patch-0.3.9_1 portmanager-0.4.0/files/patch-0.3.9_1
--- portmanager/files/patch-0.3.9_1	Fri Nov 25 12:14:23 2005
+++ portmanager-0.4.0/files/patch-0.3.9_1	Wed Dec 31 16:00:00 1969
@@ -1,222 +0,0 @@
-diff -ruN ../0.3.9/libMGPM/src/MGPMrCommandLine.c ./libMGPM/src/MGPMrCommandLine.c
---- ../0.3.9/libMGPM/src/MGPMrCommandLine.c	Wed Nov 23 19:35:36 2005
-+++ ./libMGPM/src/MGPMrCommandLine.c	Fri Nov 25 10:38:28 2005
-@@ -57,7 +57,7 @@
- /*
- 	fprintf( stdout, "MGPMrTimer received signal -=>%d\n", signalId );
- */
--	fclose( globalProperty->stdin );
-+	fclose( globalProperty->STDIN );
- 	globalProperty->timeOut	= 1;
- }
- 
-diff -ruN ../0.3.9/libMGPM/src/MGPMrGetPortName.c ./libMGPM/src/MGPMrGetPortName.c
---- ../0.3.9/libMGPM/src/MGPMrGetPortName.c	Thu Nov 24 09:28:49 2005
-+++ ./libMGPM/src/MGPMrGetPortName.c	Fri Nov 25 11:22:07 2005
-@@ -84,11 +84,11 @@
- 				/*
- 				 * set timeout default to Y
- 				 */
--				property->stdin = fopen( "/dev/stdin", "r" );
--				property->timeOut = 0;
--				signal( SIGALRM, MGPMrTimer );
- 				alarm( property->timeout );
--				answer	= getc( property->stdin );
-+				signal( SIGALRM, MGPMrTimer );
-+				property->STDIN = fopen( "/dev/stdin", "r" );
-+				property->timeOut = 0;
-+				answer	= getc( property->STDIN );
- 				
- 				switch(answer)
- 				{
-@@ -98,36 +98,36 @@
- 					}
- 					case KEY_A:
- 					{
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						property->autoMoved = 1;
- 						break;
- 					}
- 					case KEY_a:
- 					{
- 						property->autoMoved = 1;
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						break;
- 					}
- 					case KEY_Y:
- 					{
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						break;
- 					}
- 					case KEY_y:
- 					{
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						break;
- 					}
- 					case KEY_N:
- 					{
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
- 						while( fflush( stdout ) );
- 						exit(0);
- 					}
- 					case KEY_n:
- 					{
--						answer	= getc( property->stdin );
-+						answer	= getc( property->STDIN );
- 						fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
- 						while( fflush( stdout ) );
- 						exit(0);
-@@ -143,7 +143,7 @@
- 						{
- 							fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
- 							while( fflush( stdout ) );
--							answer	= getc( property->stdin );
-+							answer	= getc( property->STDIN );
- 						}
- 					}
- 				}
-@@ -156,7 +156,7 @@
- 			if( property->timeOut  == 1 )
- 			{
- 				/*
--				 * reset alarm, reopen stdin after timeout
-+				 * reset alarm, reopen STDIN after timeout
- 				 */
- 				alarm(0);
- 				property->timeOut	= 0;
-@@ -165,7 +165,7 @@
- 			}
- 			else
- 			{
--				fclose( property->stdin );
-+				fclose( property->STDIN );
- 				MGPMlogAdd( property, "installed ", portName,
- 					" removed from system:  no longer in ports tree:  see /usr/ports/MOVED", " ", " " );
- 			}
-diff -ruN ../0.3.9/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
---- ../0.3.9/libMGPM/src/MGPMrUpdate.c	Thu Nov 24 10:01:19 2005
-+++ ./libMGPM/src/MGPMrUpdate.c	Fri Nov 25 11:21:55 2005
-@@ -617,11 +617,11 @@
- 							/*
- 							 * set timeout default to Y
- 							 */
--							property->stdin = fopen( "/dev/stdin", "r" );
--							property->timeOut = 0;
--							signal( SIGALRM, MGPMrTimer );
- 							alarm( property->timeout );
--							answer	= getc( property->stdin );
-+							signal( SIGALRM, MGPMrTimer );
-+							property->STDIN = fopen( "/dev/stdin", "r" );
-+							property->timeOut = 0;
-+							answer	= getc( property->STDIN );
- 
- 							switch(answer)
- 							{
-@@ -631,24 +631,24 @@
- 								}
- 								case KEY_A:
- 								{
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									property->autoConflicts	= 1;
- 									break;
- 								}
- 								case KEY_a:
- 								{
- 									property->autoConflicts	= 1;
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									break;
- 								}
- 								case KEY_Y:
- 								{
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									break;
- 								}
- 								case KEY_y:
- 								{
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									break;
- 								}
- 								case KEY_N:
-@@ -656,7 +656,7 @@
- 									fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
- 									while( fflush( stdout ) );
- 									MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									rCleanUp( property, &localProperty );
- 									return(0);
- 								}
-@@ -665,7 +665,7 @@
- 									fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
- 									while( fflush( stdout ) );
- 									MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
--									answer	= getc( property->stdin );
-+									answer	= getc( property->STDIN );
- 									rCleanUp( property, &localProperty );
- 									return(0);
- 								}
-@@ -680,7 +680,7 @@
- 									{
- 										fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
- 										while( fflush( stdout ) );
--										answer	= getc( property->stdin );
-+										answer	= getc( property->STDIN );
- 									}
- 								}
- 							}
-@@ -691,7 +691,7 @@
- 						if( property->timeOut  == 1 )
- 						{
- 							/*
--							 * reset alarm, reopen stdin after timeout
-+							 * reset alarm, reopen STDIN after timeout
- 							 */
- 							alarm(0);
- 							property->timeOut	= 0;
-@@ -701,7 +701,7 @@
- 						}
- 						else
- 						{
--							fclose( property->stdin );
-+							fclose( property->STDIN );
- 							MGPMlogAdd( property, "conflicting installed ", localProperty.installedPortName,
- 								" removed from system: conflicted with ", oldPortName, " " );
- 						}
-@@ -1249,12 +1249,12 @@
- 	 * 5 second time delay
- 	 */
- /*
--	property->stdin = fopen( "/dev/stdin", "r" );
-+	property->STDIN = fopen( "/dev/STDIN", "r" );
- 	signal( SIGALRM, MGPMrTimer );
- 	alarm( 5 );
--	answer	= getc( property->stdin );
-+	answer	= getc( property->STDIN );
- 	alarm(0);
--	fclose( property->stdin );
-+	fclose( property->STDIN );
- */
- 	
- 	strcpy( localProperty.command, "cp /tmp/*.db " );
-diff -ruN ../0.3.9/libMGPM/src/libMGPM.h ./libMGPM/src/libMGPM.h
---- ../0.3.9/libMGPM/src/libMGPM.h	Fri Nov 25 05:50:16 2005
-+++ ./libMGPM/src/libMGPM.h	Fri Nov 25 10:38:39 2005
-@@ -139,7 +139,7 @@
- 	int	timeout;			/* default timeout in seconds */
- 	int	verbose;
- 	
--	FILE*	stdin;
-+	FILE*	STDIN;
- 	/*
- 	 * misc
- 	 */
diff -ruN portmanager/files/patch-0.3.9_2 portmanager-0.4.0/files/patch-0.3.9_2
--- portmanager/files/patch-0.3.9_2	Fri Nov 25 23:19:59 2005
+++ portmanager-0.4.0/files/patch-0.3.9_2	Wed Dec 31 16:00:00 1969
@@ -1,81 +0,0 @@
-diff -ruN ../0.3.9_1/libMGPM/src/MGPMrCommandLine.c ./libMGPM/src/MGPMrCommandLine.c
---- ../0.3.9_1/libMGPM/src/MGPMrCommandLine.c	Fri Nov 25 11:47:19 2005
-+++ ./libMGPM/src/MGPMrCommandLine.c	Fri Nov 25 18:58:23 2005
-@@ -96,6 +96,7 @@
- 	property.pristine		= 0;	/* 1 = run in pristine mode */
- 	property.resume			= 0;    /* 1 = portmanager updated itself, don't rebuild databases in -u -f mode */
- 	property.timeout		= 300;	/* default timeout in seconds */
-+	property.NoPkgtools		= 0;	/* 1 = pkgtools.conf or ruby not installed */
- 
- 	if( argv[2] && strcmp( "package-depends", argv[2] ) == 0 )
- 	{
-diff -ruN ../0.3.9_1/libMGPM/src/MGPMrReadConfigure.c ./libMGPM/src/MGPMrReadConfigure.c
---- ../0.3.9_1/libMGPM/src/MGPMrReadConfigure.c	Fri Nov 25 11:47:19 2005
-+++ ./libMGPM/src/MGPMrReadConfigure.c	Fri Nov 25 19:06:25 2005
-@@ -164,16 +164,27 @@
- 			strcat( command, "/pkgtools.db" );
- 			rReadConfigureAwkConfigure( property, configFileNameOld, command );
- 		}
-+		else
-+		{
-+			property->NoPkgtools	= 1;
-+		}
-+	}
-+	else
-+	{
-+		property->NoPkgtools	= 1;
- 	}
--
- 	strcpy( command, SHAREDIR );
- 	strcat( command, "/pkgtools.db" );
--	rReadConfigureCleanPkgToolsDb( property, command );
--	strcpy( command, "cat " );
--	strcat( command, SHAREDIR );
--	strcat( command, "/pkgtools.db >>" );
--	strcat( command, property->configDbFileName );
--	system( command );
-+
-+	if( property->NoPkgtools == 0 )
-+	{
-+		rReadConfigureCleanPkgToolsDb( property, command );
-+		strcpy( command, "cat " );
-+		strcat( command, SHAREDIR );
-+		strcat( command, "/pkgtools.db >>" );
-+		strcat( command, property->configDbFileName );
-+		system( command );
-+	}
- 
- /*
- 	strcpy( command, "rm -f " );
-@@ -441,8 +452,16 @@
- 
- 	value		= calloc( 0xfff, 1 );
- 
--	pkgtoolsDb	= MGdbOpen( pkgtoolsFileName );
--	pkgtoolsQTY	= MGdbGetRecordQty( pkgtoolsDb );
-+	if( MGrIfFileExist( pkgtoolsFileName ) )
-+	{
-+		pkgtoolsDb	= MGdbOpen( pkgtoolsFileName );
-+		pkgtoolsQTY	= MGdbGetRecordQty( pkgtoolsDb );
-+	}
-+	else
-+	{
-+		free( value );
-+		return( 1 );
-+	}
- 
- 	while( pkgtoolsIDX < pkgtoolsQTY )
- 	{
-diff -ruN ../0.3.9_1/libMGPM/src/libMGPM.h ./libMGPM/src/libMGPM.h
---- ../0.3.9_1/libMGPM/src/libMGPM.h	Fri Nov 25 11:47:19 2005
-+++ ./libMGPM/src/libMGPM.h	Fri Nov 25 18:57:49 2005
-@@ -146,7 +146,8 @@
- 	char*	configConfFileName;
- 	char*	helpFile;
- 	int	timeOut;			/* see MGPMrGetPortName.c */
--
-+	int	NoPkgtools;			/* 1 = pkgtools.conf or ruby not installed */
-+	
- 	/*
- 	 * data base structures/file names/fieldnames
- 	 */
diff -ruN portmanager/files/patch-0.3.9_3 portmanager-0.4.0/files/patch-0.3.9_3
--- portmanager/files/patch-0.3.9_3	Sun Nov 27 12:28:16 2005
+++ portmanager-0.4.0/files/patch-0.3.9_3	Wed Dec 31 16:00:00 1969
@@ -1,58 +0,0 @@
-diff -ruN ../0.3.9_2/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
---- ../0.3.9_2/libMGPM/src/MGPMrUpdate.c	Sat Nov 26 04:48:47 2005
-+++ ./libMGPM/src/MGPMrUpdate.c	Sat Nov 26 13:43:36 2005
-@@ -78,16 +78,6 @@
- 	int	installedPortsDbQTY				= 0;
- 
- 	structLocalProperty	localProperty;
--/*
--fprintf( stdout, "%s debug: oldPortDir-=>%s\n", id, oldPortDir );
--while( fflush( stdout ) );
--*/
--	if( ( strcmp( "/sysutils/portmanager", oldPortDir ) == 0 || strcmp( "/local/sysutils/portmanager", oldPortDir ) == 0 ) && property->forced )
--	{
--		fprintf( stdout, "skipping portmanager, will not self update in forced mode by design\n" );
--		while( fflush( stdout ) );
--		return( 0 );
--	}
- 
- 	property->optionsChanged	= 0;
- 
-@@ -118,6 +108,19 @@
- 	property->installedPortsDb		= MGdbOpen( property->installedPortsDbFileName );
- 	property->strikesDb			= MGdbOpen( property->strikesDbFileName );
- 
-+
-+	if( ( strcmp( "/sysutils/portmanager", oldPortDir ) == 0 || strcmp( "/local/sysutils/portmanager", oldPortDir ) == 0 ) && property->forced )
-+	{
-+		fprintf( stdout, "ignoring portmanager, will not self update in forced mode by design\n" );
-+		MGPMlogAdd( property, "ignoring portmanager ", "will not self update in forced mode by design",
-+								oldPortDir, "added to ignore.db", " " );
-+
-+		MGdbAdd( property->ignoreDb, oldPortDir, "skipping portmanager, will not self update in forced mode by design\n", NULL );
-+		while( fflush( stdout ) );
-+		rCleanUp( property, &localProperty );
-+		return( 0 );
-+	}
-+
- 	/* 
- 	 * test for bsd.ports.mk patch
- 	 */
-@@ -418,16 +421,7 @@
- 				 * options changed so need to purge oldPortDir's records
- 				 * from availablePortsDb and availableDependenciesDb
- 				 */
--				if( property->log )
--				{
--					strcpy( localProperty.command, "echo \"    options changed so returning " );
--					strcat( localProperty.command, oldPortName );
--					strcat( localProperty.command, " " );
--					strcat( localProperty.command, oldPortDir );
--					strcat( localProperty.command, " to out of date pool " );
--					strcat( localProperty.command, " \">> /var/log/portmanager.log" );
--					system( localProperty.command );
--				}
-+				MGPMlogAdd( property, "options changed so returning ", oldPortName, oldPortDir, " to out of date pool ", " " );
- 				property->optionsChanged	= 1;
- 				MGdbGoTop( property->availablePortsDb );
- 				while( MGdbSeek( property->availablePortsDb,
diff -ruN portmanager/files/patch-0.3.9_4 portmanager-0.4.0/files/patch-0.3.9_4
--- portmanager/files/patch-0.3.9_4	Sun Nov 27 22:20:16 2005
+++ portmanager-0.4.0/files/patch-0.3.9_4	Wed Dec 31 16:00:00 1969
@@ -1,574 +0,0 @@
-diff -ruN ../0.3.9_3/libMGPM/src/MGPMrController.c ./libMGPM/src/MGPMrController.c
---- ../0.3.9_3/libMGPM/src/MGPMrController.c	Sat Nov 26 14:30:47 2005
-+++ ./libMGPM/src/MGPMrController.c	Sun Nov 27 05:58:44 2005
-@@ -155,6 +155,7 @@
- 	{
- 		property->pristine	= 1;
- 	} 
-+
- 	MGdbDestroy( property->commandLineDb );
- 
- 	property->logFile	= MGPMlogCreate( property );
-diff -ruN ../0.3.9_3/libMGPM/src/MGPMrCreateInstalledDb.c ./libMGPM/src/MGPMrCreateInstalledDb.c
---- ../0.3.9_3/libMGPM/src/MGPMrCreateInstalledDb.c	Sat Nov 26 14:30:47 2005
-+++ ./libMGPM/src/MGPMrCreateInstalledDb.c	Sun Nov 27 07:06:23 2005
-@@ -167,6 +167,7 @@
- 	buffer		= (char*)calloc( bufferSize + 1, 1 );
- 	buffer[bufferSize-1]	= 0;
- 	fread(buffer, 1, bufferSize, contentsFileStream );
-+	fclose( contentsFileStream );
- 	buffPtr	= buffer;
- 	portDependencyName	= buffer;
- 	if( ( dependencyDbStream = fopen( property->dependencyPortsDbFileName, "a" ) ) == 0 )
-@@ -209,6 +210,7 @@
- 			fprintf( stdout, "pkg_delete -f %s/%s then find it in /usr/ports/{category}/{portname} and reinstall\n",
- 				PKGDBDIR, installedPortNamePtr );
- */
-+			fclose( dependencyDbStream );
- 			return( 1 );
- 		}
- 
-@@ -251,13 +253,6 @@
- 		return( 1 );
- 	}
- 	free(buffer);
--	if( fclose( contentsFileStream ) )
--	{
--		fprintf( stderr, "%s %s error: can not close  %s\n", id, PACKAGE_VERSION, contentsFileName );
--		perror( "system message" );
--		while( fflush( stderr ) );
--		return( 1 );
--	}
- 	free(contentsFileName);
- 	return(0);
- }
-@@ -292,14 +287,12 @@
- 	{
- 		if( property->pmMode	== 2 )
- 		{
--fprintf( stderr, "%s %s DEBUG(1): could not open %s pmMode-=>%d\n", id, PACKAGE_VERSION, contentsFileName, property->pmMode );
--perror( "system message" );
--while( fflush( stderr ) );
- 			free( contentsFileName );
- 			return(1);
- 		}
- 		fprintf( stderr, "%s %s error: could not open %s pmMode-=>%d\n", id, PACKAGE_VERSION, contentsFileName, property->pmMode );
- 		perror( "system message" );
-+		free( contentsFileName );
- 		while( fflush( stderr ) );
- 		return( 1 );
- 	}
-@@ -314,6 +307,7 @@
- 		fprintf( stderr, "\t\t%s installation is corrupt!\n", installedPortNamePtr );
- 		fprintf( stderr, "\t\trecomend running \"pkg_delete -f %s\" then manually reinstalling this port\n", installedPortNamePtr );
- 		while( fflush( stderr ) );
-+		free( buffer );
- 		return( 1 );
- 	}
- 
-@@ -324,6 +318,7 @@
- 		fprintf( stderr, "\t\t%s installation is corrupt!\n", installedPortNamePtr );
- 		fprintf( stderr, "\t\trecomend running \"pkg_delete -f %s\" then manually reinstalling this port\n", installedPortNamePtr );
- 		while( fflush( stderr ) );
-+		free( buffer );
- 		return( 1 );
- 	}
- 	portDirTemp[address-portDirTemp]	= 0;
-@@ -404,6 +399,8 @@
- 		fprintf( stderr, "\t\t%s installation is corrupt!\n", installedPortNamePtr );
- 		fprintf( stderr, "\t\trecomend running \"pkg_delete -f %s\" then manually reinstalling this port\n", installedPortNamePtr );
- 		while( fflush( stderr ) );
-+		free( buffer );
-+		free( contentsFileName );
- 		return( 1 );
- 	}
- 
-@@ -416,11 +413,12 @@
- 		fprintf( stderr, "\t\t%s installation is corrupt!\n", installedPortNamePtr );
- 		fprintf( stderr, "\t\trecomend running \"pkg_delete -f %s\" then manually reinstalling this port\n", installedPortNamePtr );
- 		while( fflush( stderr ) );
-+		free( buffer );
-+		free( contentsFileName );
- 		return( 1 );
- 	}
- 
- 	free( contentsFileName );
--
- 	free( buffer );
- 
- 	return( 0 );
-diff -ruN ../0.3.9_3/libMGPM/src/MGPMrGetPortName.c ./libMGPM/src/MGPMrGetPortName.c
---- ../0.3.9_3/libMGPM/src/MGPMrGetPortName.c	Sat Nov 26 14:30:47 2005
-+++ ./libMGPM/src/MGPMrGetPortName.c	Sun Nov 27 19:21:34 2005
-@@ -41,6 +41,7 @@
- 	char*	optionsPtr			= NULL;
- 	int	answer				= 0;
- 	int	bufferSize			= 0xffff;
-+	int	doubleBreak			= 0;
- 
- 	command		= (char*)calloc( bufferSize, 1 );
- 
-@@ -88,63 +89,72 @@
- 				signal( SIGALRM, MGPMrTimer );
- 				property->STDIN = fopen( "/dev/stdin", "r" );
- 				property->timeOut = 0;
--				answer	= getc( property->STDIN );
--				
--				switch(answer)
-+				doubleBreak	= 0;
-+				while( 1 == 1 )
- 				{
--					case KEY_ENTER:
-+					answer	= getc( property->STDIN );
-+					fclose( property->STDIN );
-+					switch(answer)
- 					{
--						break;
--					}
--					case KEY_A:
--					{
--						answer	= getc( property->STDIN );
--						property->autoMoved = 1;
--						break;
--					}
--					case KEY_a:
--					{
--						property->autoMoved = 1;
--						answer	= getc( property->STDIN );
--						break;
--					}
--					case KEY_Y:
--					{
--						answer	= getc( property->STDIN );
--						break;
--					}
--					case KEY_y:
--					{
--						answer	= getc( property->STDIN );
--						break;
--					}
--					case KEY_N:
--					{
--						answer	= getc( property->STDIN );
--						fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
--						while( fflush( stdout ) );
--						exit(0);
--					}
--					case KEY_n:
--					{
--						answer	= getc( property->STDIN );
--						fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
--						while( fflush( stdout ) );
--						exit(0);
--					}
--					default:
--					{
--						if( property->timeOut )
-+						case KEY_ENTER:
- 						{
--							fprintf( stdout, "5 minute timeout, defaulting to [Y]\n");
-+							doubleBreak	= 1;
-+							break;
-+						}
-+						case KEY_A:
-+						{
-+							property->autoMoved = 1;
-+							doubleBreak	= 1;
-+							break;
-+						}
-+						case KEY_a:
-+						{
-+							property->autoMoved = 1;
-+							doubleBreak	= 1;
-+							break;
-+						}
-+						case KEY_Y:
-+						{
-+							doubleBreak	= 1;
-+							break;
-+						}
-+						case KEY_y:
-+						{
-+							doubleBreak	= 1;
-+							break;
-+						}
-+						case KEY_N:
-+						{
-+							fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
- 							while( fflush( stdout ) );
-+							exit(0);
- 						}
--						else
-+						case KEY_n:
- 						{
--							fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
-+							fprintf( stdout, "you will have to deal with this manually then, portmanager shutting down\n" );
- 							while( fflush( stdout ) );
--							answer	= getc( property->STDIN );
-+							exit(0);
-+						}
-+						default:
-+						{
-+							if( property->timeOut )
-+							{
-+								fprintf( stdout, "5 minute timeout, defaulting to [Y]\n");
-+								while( fflush( stdout ) );
-+								doubleBreak	= 1;
-+								break;
-+							}
-+							else
-+							{
-+								property->STDIN = fopen( "/dev/stdin", "r" );
-+								fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
-+								while( fflush( stdout ) );
-+							}
- 						}
-+					}
-+					if( doubleBreak )
-+					{
-+						break;
- 					}
- 				}
- 			}
-diff -ruN ../0.3.9_3/libMGPM/src/MGPMrShowLeavesDelete.c ./libMGPM/src/MGPMrShowLeavesDelete.c
---- ../0.3.9_3/libMGPM/src/MGPMrShowLeavesDelete.c	Sat Nov 26 14:30:47 2005
-+++ ./libMGPM/src/MGPMrShowLeavesDelete.c	Sun Nov 27 20:42:14 2005
-@@ -42,10 +42,11 @@
- 	char*	leafPortDir		= NULL;
- 	char*	leafPortName		= NULL;
- 	char*	pkgDescFile		= NULL;
-+	int	answer			= 1;
- 	int	bufferSize		= 0xffff;
-+	int	doubleBreak		= 0;
- 	int	installedPortsDbIDX	= 0;
- 	int	installedPortsDbQTY	= 0;
--	int	key			= 1;
- 	
- 	command		= calloc( bufferSize, 1 );
- 	leafPortDir	= calloc( bufferSize, 1 );
-@@ -107,8 +108,10 @@
- 			installedPortsDbIDX++;
- 			continue;
- 		}
--		if( key != KEY_ENTER )
-+/*
-+		if( answer != KEY_ENTER )
- 		{
-+*/
- 			system( "clear" );
- 			fprintf( stdout,"%s\n", SINGLE_LINES );
- 			fprintf( stdout, "*** for safety run portmanager -u after using this feature for deletion ***\n" );
-@@ -144,73 +147,87 @@
- 				system( command );
- 			}
- 			fprintf( stdout,"%s\n", SINGLE_LINES );
--			fprintf( stdout, "\n<SPACE><ENTER> to skip\n<X><ENTER> removes port\n<N><ENTER> *Nuke it*, removes distribution files\n\n" ); 
-+			fprintf( stdout, "\n<ENTER> to skip\n<X><ENTER> removes port\n<N><ENTER> *Nuke it*, removes distribution files\n\n" ); 
- 			fprintf( stdout,"%s\n", SINGLE_LINES );
-+/*
- 		}
--		key		= getc( stdin );
--		switch( key )
-+*/
-+		property->STDIN = fopen( "/dev/stdin", "r" );
-+		doubleBreak	= 0;
-+		while( 1 == 1 )
- 		{
--			case	KEY_ENTER:
--			{
--				continue;
-+			answer	= getc( property->STDIN );
-+			fclose( property->STDIN );
-+			switch(answer)
-+			{
-+				case	KEY_ENTER:
-+				{
-+					doubleBreak	= 1;
-+					MGdbAdd( property->ignoreDb, leafPortDir, "-slid <SPACE> skipped", NULL );
-+					fprintf( stdout, "Skipping %s\n\n", leafPortName );
-+					break;
-+				}
-+				case	KEY_n:
-+				{
-+					doubleBreak	= 1;
-+					/* nuke() */
-+					fprintf( stdout, "<n> Nuking %s\n\n", leafPortName );
-+					removePort( property, leafPortName, installedPortsDbIDX );
-+					nuke( leafPortDir );
-+					rebuildDb( property );
-+					installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
-+					installedPortsDbIDX	= 1;
-+					break;
-+				}
-+				case	KEY_N:
-+				{
-+					doubleBreak	= 1;
-+					/* nuke() */
-+					fprintf( stdout, "<N> Nuking %s\n\n", leafPortName );
-+					removePort( property, leafPortName, installedPortsDbIDX );
-+					nuke( leafPortDir );
-+					rebuildDb( property );
-+					installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
-+					installedPortsDbIDX	= 1;
-+					break;
-+				}
-+				case	KEY_x:
-+				{
-+					doubleBreak	= 1;
-+					/* delete() */
-+					fprintf( stdout, "<x> Removing %s\n\n", leafPortName );
-+					removePort( property, leafPortName, installedPortsDbIDX );
-+					rebuildDb( property );
-+					installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
-+					installedPortsDbIDX	= 1;
-+					break;
-+				}
-+				case	KEY_X:
-+				{
-+					doubleBreak	= 1;
-+					/* delete() */
-+					fprintf( stdout, "<X> Removing %s\n\n", leafPortName );
-+					removePort( property, leafPortName, installedPortsDbIDX );
-+					rebuildDb( property );
-+					installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
-+					installedPortsDbIDX	= 1;
-+					break;
-+				}
-+				default:
-+				{
-+					property->STDIN = fopen( "/dev/stdin", "r" );
-+					fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
-+					while( fflush( stdout ) );
-+				}
- 			}
--			case	KEY_SPACE:
-+			if( doubleBreak )
- 			{
--				MGdbAdd( property->ignoreDb, leafPortDir, "-slid <SPACE> skipped", NULL );
--				fprintf( stdout, "<SPACE> Skipping %s\n\n", leafPortName );
--				break;
--			}
--			case	KEY_n:
--			{
--				/* nuke() */
--				fprintf( stdout, "<n> Nuking %s\n\n", leafPortName );
--				removePort( property, leafPortName, installedPortsDbIDX );
--				nuke( leafPortDir );
--				rebuildDb( property );
--				installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
--				installedPortsDbIDX	= 1;
--				break;
--			}
--			case	KEY_N:
--			{
--				/* nuke() */
--				fprintf( stdout, "<N> Nuking %s\n\n", leafPortName );
--				removePort( property, leafPortName, installedPortsDbIDX );
--				nuke( leafPortDir );
--				rebuildDb( property );
--				installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
--				installedPortsDbIDX	= 1;
--				break;
--			}
--			case	KEY_x:
--			{
--				/* delete() */
--				fprintf( stdout, "<x> Removing %s\n\n", leafPortName );
--				removePort( property, leafPortName, installedPortsDbIDX );
--				rebuildDb( property );
--				installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
--				installedPortsDbIDX	= 1;
--				break;
--			}
--			case	KEY_X:
--			{
--				/* delete() */
--				fprintf( stdout, "<X> Removing %s\n\n", leafPortName );
--				removePort( property, leafPortName, installedPortsDbIDX );
--				rebuildDb( property );
--				installedPortsDbQTY	= MGdbGetRecordQty( property->installedPortsDb );
--				installedPortsDbIDX	= 1;
--				break;
--			}
--			default:
--			{
--				MGdbAdd( property->ignoreDb, leafPortDir, "-slid <DEFAULT> skipped", NULL );
--				fprintf( stdout, "Skipping %s\n\n", leafPortName );
- 				break;
- 			}
- 		}
- 		fprintf( stdout, "\n" );
- 		installedPortsDbIDX++;
-+
- 	}
- 	MGdbDestroy( property->availableDependenciesDb );
- 	MGdbDestroy( property->ignoreDb );
-diff -ruN ../0.3.9_3/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
---- ../0.3.9_3/libMGPM/src/MGPMrUpdate.c	Sat Nov 26 14:30:47 2005
-+++ ./libMGPM/src/MGPMrUpdate.c	Sun Nov 27 18:54:47 2005
-@@ -72,6 +72,7 @@
- 	int	availableDependenciesDbQTY			= 0;
- 	int	availablePortsDbIDX				= 0;
- 	int	bufferSize					= 0xffff;
-+	int	doubleBreak					= 0;
- 	int	errorCode					= 0;
- 	int	idx						= 0;
- 	int	installedPortsDbIDX				= 0;
-@@ -615,67 +616,77 @@
- 							signal( SIGALRM, MGPMrTimer );
- 							property->STDIN = fopen( "/dev/stdin", "r" );
- 							property->timeOut = 0;
--							answer	= getc( property->STDIN );
--
--							switch(answer)
-+							doubleBreak	= 0;
-+							while( 1 == 1 )
- 							{
--								case KEY_ENTER:
--								{
--									break;
--								}
--								case KEY_A:
--								{
--									answer	= getc( property->STDIN );
--									property->autoConflicts	= 1;
--									break;
--								}
--								case KEY_a:
--								{
--									property->autoConflicts	= 1;
--									answer	= getc( property->STDIN );
--									break;
--								}
--								case KEY_Y:
--								{
--									answer	= getc( property->STDIN );
--									break;
--								}
--								case KEY_y:
--								{
--									answer	= getc( property->STDIN );
--									break;
--								}
--								case KEY_N:
--								{
--									fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
--									while( fflush( stdout ) );
--									MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
--									answer	= getc( property->STDIN );
--									rCleanUp( property, &localProperty );
--									return(0);
--								}
--								case KEY_n:
--								{
--									fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
--									while( fflush( stdout ) );
--									MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
--									answer	= getc( property->STDIN );
--									rCleanUp( property, &localProperty );
--									return(0);
--								}
--								default:
-+								answer	= getc( property->STDIN );
-+								fclose( property->STDIN );
-+								switch(answer)
- 								{
--									if( property->timeOut )
-+									case KEY_ENTER:
-+									{
-+										doubleBreak	= 1;
-+										break;
-+									}
-+									case KEY_A:
-+									{
-+										doubleBreak	= 1;
-+										property->autoConflicts	= 1;
-+										break;
-+									}
-+									case KEY_a:
- 									{
--										fprintf( stdout, "5 minute timeout, defaulting to [Y]\n");
-+										doubleBreak	= 1;
-+										property->autoConflicts	= 1;
-+										break;
-+									}
-+									case KEY_Y:
-+									{
-+										doubleBreak	= 1;
-+										break;
-+									}
-+									case KEY_y:
-+									{
-+										doubleBreak	= 1;
-+										break;
-+									}
-+									case KEY_N:
-+									{
-+										fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
- 										while( fflush( stdout ) );
-+										MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
-+										rCleanUp( property, &localProperty );
-+										return(0);
- 									}
--									else
-+									case KEY_n:
- 									{
--										fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
-+										fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
- 										while( fflush( stdout ) );
--										answer	= getc( property->STDIN );
-+										MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
-+										rCleanUp( property, &localProperty );
-+										return(0);
-+									}
-+									default:
-+									{
-+										if( property->timeOut )
-+										{
-+											fprintf( stdout, "5 minute timeout, defaulting to [Y]\n");
-+											while( fflush( stdout ) );
-+											doubleBreak	= 1;
-+											break;
-+										}
-+										else
-+										{
-+											property->STDIN = fopen( "/dev/stdin", "r" );
-+											fprintf( stdout, "Invalid option. Please enter either Y to upgrade or N\n");
-+											while( fflush( stdout ) );
-+										}
- 									}
-+									
-+								}
-+								if( doubleBreak )
-+								{
-+									break;
- 								}
- 							}
- 						}
-@@ -695,7 +706,6 @@
- 						}
- 						else
- 						{
--							fclose( property->STDIN );
- 							MGPMlogAdd( property, "conflicting installed ", localProperty.installedPortName,
- 								" removed from system: conflicted with ", oldPortName, " " );
- 						}
-@@ -1573,17 +1583,7 @@
- 		strcpy( comment, "port marked " );
- 		strcat( comment, brokeCheckType );
- 		MGdbAdd( property->ignoreDb, oldPortDir, comment, NULL );
--		if( property->log )
--		{
--			strcpy( command, "echo \"      " );
--			strcat( command, oldPortName );
--			strcat( command, " " );
--			strcat( command, oldPortDir );
--			strcat( command, " marked " );
--			strcat( command, brokeCheckType );
--			strcat( command, " port not installed/updated\" >> /var/log/portmanager.log" );
--			system( command );
--		}
-+		MGPMlogAdd( property, oldPortName, oldPortDir, " marked ", brokeCheckType, " port not installed/updated" );
- 		pclose( pHandle );
- 		free( buffer );	
- 		free( command );
diff -ruN portmanager/files/patch-0.3.9_5 portmanager-0.4.0/files/patch-0.3.9_5
--- portmanager/files/patch-0.3.9_5	Tue Nov 29 07:18:28 2005
+++ portmanager-0.4.0/files/patch-0.3.9_5	Wed Dec 31 16:00:00 1969
@@ -1,232 +0,0 @@
-diff -ruN ../0.3.9_4/libMGPM/src/MGPMrController.c ./libMGPM/src/MGPMrController.c
---- ../0.3.9_4/libMGPM/src/MGPMrController.c	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/MGPMrController.c	Tue Nov 29 03:03:01 2005
-@@ -163,7 +163,7 @@
- 	/*
- 	 * Need to check configDb for ignored ports and add them to ignoreDb here
- 	 */
--	MGPMrReadConfigure( property );
-+	MGPMrReadConfigure( property, " " );
- 
- 	while( fflush( stdout ) );
- 	if( property->buildDependsAreLeaves )
-@@ -180,7 +180,7 @@
- 	{
- 		if( property->resume == 0 ) /* skip this if portmanager has upgraded/rebuilt its self */
- 		{
--			MGPMrReadConfigure( property );
-+			MGPMrReadConfigure( property, " " );
- 			if( ( errorCode	= MGPMrCreateAllUpdateStatusDb( property ) ) )
- 			{
- 				fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION,
-@@ -241,7 +241,7 @@
- 		property->pmMode	= 1; /* fake like we are in single port update */
- 		if( property->resume == 0 )
- 		{
--			MGPMrReadConfigure( property );
-+			MGPMrReadConfigure( property, " " );
- 			if( ( errorCode	= MGPMrCreateAllUpdateStatusDb( property ) ) )
- 			{
- 				fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION,
-@@ -284,7 +284,7 @@
- 		 */
- 		if( property->resume == 0 ) /* skip this if --resume  */
- 		{
--			MGPMrReadConfigure( property );
-+			MGPMrReadConfigure( property, " " );
- 			if( ( errorCode	= MGPMrSinglePortCreateStatusDb( property, path ) ) )
- 			{
- 				fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION, "MGPMrSinglePortCreateStatusDb", errorCode );
-@@ -296,7 +296,7 @@
- 		}
- 		while( 1 )
- 		{
--			MGPMrReadConfigure( property );
-+			MGPMrReadConfigure( property, " " );
- 			if( ( errorCode	= MGPMrStatus( property ) ) )
- 			{
- 				fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION, "MGPMrStatus", errorCode );
-@@ -492,7 +492,7 @@
- 	property->pmMode	= 1; /* fake like we are in single port update */
- 	if( property->resume == 0 ) /* skip this if portmanager has upgraded/rebuilt its self */
- 	{
--		MGPMrReadConfigure( property );
-+		MGPMrReadConfigure( property, " " );
- 		if( ( errorCode	= MGPMrCreateAllUpdateStatusDb( property ) ) )
- 		{
- 			fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION,
-@@ -502,7 +502,7 @@
- 	}
- 	while( 1 )
- 	{
--		MGPMrReadConfigure( property );
-+		MGPMrReadConfigure( property, " " );
- 		if( ( errorCode	= MGPMrStatus( property ) ) )
- 		{
- 			fprintf( stdout, "%s %s error: %s returned errorCode %d\n", id, PACKAGE_VERSION, "MGPMrStatus", errorCode );
-diff -ruN ../0.3.9_4/libMGPM/src/MGPMrPackageDepends.c ./libMGPM/src/MGPMrPackageDepends.c
---- ../0.3.9_4/libMGPM/src/MGPMrPackageDepends.c	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/MGPMrPackageDepends.c	Tue Nov 29 03:25:59 2005
-@@ -58,7 +58,7 @@
- 	
- 	pkgDb	= MGdbCreate( pkgDbFileName, "fieldPortName", "fieldPortDir", NULL );
- 
--	MGPMrReadConfigure( property );
-+	MGPMrReadConfigure( property, path );
- 
- 	if( ( errorCode	= MGPMrSinglePortCreateStatusDb( property, path ) ) )
- 	{
-@@ -101,11 +101,21 @@
- 			 * Gaurentee that we get the name from /var/db/pkg/{port name}
- 			 */
- 			MGdbGoTop( property->installedPortsDb );
--			strcpy( portName, MGdbSeek( property->installedPortsDb,
--							property->fieldInstalledPortsDbPortDir,
--							portDir,
--							property->fieldInstalledPortsDbPortName,
--							exact ) );	
-+			if( MGdbSeek( property->installedPortsDb,
-+					property->fieldInstalledPortsDbPortDir,
-+					portDir,
-+					property->fieldInstalledPortsDbPortName,
-+					exact ) )
-+			{
-+				strcpy( portName, MGdbGet( property->installedPortsDb,
-+							MGdbGetRecno( property->installedPortsDb ) - 1,
-+							property->fieldInstalledPortsDbPortName ) );	
-+			}
-+			else
-+			{
-+				continue;
-+			}
-+			
- 			/*
- 			 * Below is to prevent dupes instead of just fprinting portName & portDir
- 			 */
-diff -ruN ../0.3.9_4/libMGPM/src/MGPMrReadConfigure.c ./libMGPM/src/MGPMrReadConfigure.c
---- ../0.3.9_4/libMGPM/src/MGPMrReadConfigure.c	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/MGPMrReadConfigure.c	Tue Nov 29 03:26:30 2005
-@@ -56,7 +56,7 @@
- int	rReadConfigureMergeRecords( structProperty* property, char* configDbFileName );
- int	rReadConfigureParse( structProperty* property, char* configDbFileName, int flags );
- 
--int	MGPMrReadConfigure( structProperty* property )
-+int	MGPMrReadConfigure( structProperty* property, char* newPortDir )
- {
- 	FILE*		fHandle			= NULL;
- 	FILE*		pHandle			= NULL;
-@@ -130,6 +130,17 @@
- 	}
- 
- 	rReadConfigureAwkConfigure( property, property->configConfFileName,  property->configDbFileName );
-+
-+	/*
-+	 * Create a record for port that isn't installed yet if portmanager
-+	 * is being used to add a new port
-+	 */
-+	if( strlen( newPortDir ) > 1 )
-+	{
-+		configDb	= MGdbOpen( property->configDbFileName );
-+		MGdbAdd( configDb, newPortDir, " ", NULL );
-+		MGdbDestroy( configDb );
-+	}
- 
- 	/*
- 	 * Is ruby installed?
-diff -ruN ../0.3.9_4/libMGPM/src/MGPMrStatus.c ./libMGPM/src/MGPMrStatus.c
---- ../0.3.9_4/libMGPM/src/MGPMrStatus.c	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/MGPMrStatus.c	Mon Nov 28 14:00:00 2005
-@@ -328,13 +328,35 @@
- 					availablePortsDbPortDirPtr ); 
- 				while( fflush( stdout ) );
- 
--				MGdbAdd( property->oldPortsDb,
--					availablePortsDbPortDirPtr,
--					availablePortsDbPortNamePtr,
--					"MISSING",
--					availablePortsDbPortNamePtr,
--					availablePortsDbPortDirPtr,
--					NULL );
-+				MGdbGoTop( property->availableDependenciesDb );
-+				if( MGdbSeek( property->availableDependenciesDb,
-+						property->fieldAvailableDependenciesDbDependencyDir,
-+						availablePortsDbPortDirPtr,
-+						property->fieldAvailableDependenciesDbDependencyDir,
-+						exact ) )
-+				{
-+					MGdbAdd( property->oldPortsDb,
-+						availablePortsDbPortDirPtr,
-+						availablePortsDbPortNamePtr,
-+						"MISSING dependency of",
-+						MGdbGet( property->availableDependenciesDb,
-+							MGdbGetRecno( property->availableDependenciesDb ) - 1,
-+							property->fieldAvailableDependenciesDbPortName ),
-+						MGdbGet( property->availableDependenciesDb,
-+							MGdbGetRecno( property->availableDependenciesDb ) - 1,
-+							property->fieldAvailableDependenciesDbPortDir ),
-+						NULL );
-+				}
-+				else
-+				{
-+					MGdbAdd( property->oldPortsDb,
-+						availablePortsDbPortDirPtr,
-+						availablePortsDbPortNamePtr,
-+						"MISSING",
-+						availablePortsDbPortNamePtr,
-+						availablePortsDbPortDirPtr,
-+						NULL );
-+				}
- 			}
- 		}
- 		availablePortsDbIDX++;
-diff -ruN ../0.3.9_4/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
---- ../0.3.9_4/libMGPM/src/MGPMrUpdate.c	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/MGPMrUpdate.c	Mon Nov 28 08:50:05 2005
-@@ -652,16 +652,32 @@
- 									}
- 									case KEY_N:
- 									{
--										fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
-+										fprintf( stdout,
-+											"\nAdding  %s %s conflicts with installed port %s added to ignore list\n",
-+											oldPortName, oldPortDir, localProperty.installedPortName );
- 										while( fflush( stdout ) );
-+										MGPMlogAdd( property,
-+											oldPortName,
-+											oldPortDir,
-+											"conflicts with installed port ",
-+											localProperty.installedPortName,
-+											" added to ignore.db" );
- 										MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
- 										rCleanUp( property, &localProperty );
- 										return(0);
- 									}
- 									case KEY_n:
- 									{
--										fprintf( stdout, "\nAdding  %s %s to ignore list\n", oldPortName, oldPortDir );
-+										fprintf( stdout,
-+											"\nAdding  %s %s conflicts with installed port %s added to ignore list\n",
-+											oldPortName, oldPortDir, localProperty.installedPortName );
- 										while( fflush( stdout ) );
-+										MGPMlogAdd( property,
-+											oldPortName,
-+											oldPortDir,
-+											"conflicts with installed port ",
-+											localProperty.installedPortName,
-+											" added to ignore.db" );
- 										MGdbAdd( property->ignoreDb, oldPortDir, "conflicts with another port", NULL );
- 										rCleanUp( property, &localProperty );
- 										return(0);
-diff -ruN ../0.3.9_4/libMGPM/src/libMGPM.h ./libMGPM/src/libMGPM.h
---- ../0.3.9_4/libMGPM/src/libMGPM.h	Sun Nov 27 21:47:15 2005
-+++ ./libMGPM/src/libMGPM.h	Tue Nov 29 02:59:21 2005
-@@ -238,7 +238,7 @@
- int		MGPMrMissingDependencies( structProperty* property );
- int		MGPMrPackageDepends( structProperty* property , char* path );
- int		MGPMrParse( structProperty* property, char* availablePortName, char* availablePortDir, char* dependType, char* buffer, int* counterPtr );
--int		MGPMrReadConfigure( structProperty* property );
-+int		MGPMrReadConfigure( structProperty* property, char* newPortDir );
- int		MGPMrShowLeaves( structProperty* property );
- int		MGPMrShowLeavesDelete( structProperty* property );
- int		MGPMrSinglePortCreateStatusDb( structProperty* property, char* path );
-Binary files ../0.3.9_4/portmanager-0.3.10.tar.gz and ./portmanager-0.3.10.tar.gz differ
diff -ruN portmanager/files/patch-0.3.9_6 portmanager-0.4.0/files/patch-0.3.9_6
--- portmanager/files/patch-0.3.9_6	Sat Dec  3 13:56:37 2005
+++ portmanager-0.4.0/files/patch-0.3.9_6	Wed Dec 31 16:00:00 1969
@@ -1,143 +0,0 @@
-diff -ruN ../0.3.9_5/libMGPM/src/MGPMrController.c ./libMGPM/src/MGPMrController.c
---- ../0.3.9_5/libMGPM/src/MGPMrController.c	Tue Nov 29 18:31:42 2005
-+++ ./libMGPM/src/MGPMrController.c	Sat Dec  3 14:01:34 2005
-@@ -165,17 +165,6 @@
- 	 */
- 	MGPMrReadConfigure( property, " " );
- 
--	while( fflush( stdout ) );
--	if( property->buildDependsAreLeaves )
--	{
--		fprintf( stdout, "%s\n", SINGLE_LINES );
--		fprintf( stdout, "%s\n", "running in WITH_BUILD_DEPENDS_ARE_LEAVES mode" );
--		fprintf( stdout, "%s\n", "using this mode is not endorsed by author, if ports" );
--		fprintf( stdout, "%s\n", "fail building due to missing build dependencies" );
--		fprintf( stdout, "%s\n", "in sysutils/portmanager run \"make config\" and shut this mode off" );
--		fprintf( stdout, "%s\n", "then rebuild/reinstall portmanager before contacting author/maintainer" );
--		fprintf( stdout, "%s\n", DOUBLE_LINES );
--	}
- 	if( path && ( strcmp( path, "SHOWLEAVES" ) == 0 ) )
- 	{
- 		if( property->resume == 0 ) /* skip this if portmanager has upgraded/rebuilt its self */
-@@ -273,7 +262,21 @@
- 		 */
- 		if( argv[2] && strcmp( "package-depends", argv[2] ) == 0 )
- 		{
--			errorCode	= MGPMrPackageDepends( property, path );
-+			property->pmMode	= 2;
-+
-+			if( property->buildDependsAreLeaves && property->pmMode != 2 )
-+			{
-+				fprintf( stdout, "%s\n", SINGLE_LINES );
-+				fprintf( stdout, "%s\n", "running in WITH_BUILD_DEPENDS_ARE_LEAVES mode" );
-+				fprintf( stdout, "%s\n", "using this mode is not endorsed by author, if ports" );
-+				fprintf( stdout, "%s\n", "fail building due to missing build dependencies" );
-+				fprintf( stdout, "%s\n", "in sysutils/portmanager run \"make config\" and shut this mode off" );
-+				fprintf( stdout, "%s\n", "then rebuild/reinstall portmanager before contacting author/maintainer" );
-+				fprintf( stdout, "%s\n", DOUBLE_LINES );
-+				while( fflush( stdout ) );
-+			}
-+
-+			errorCode		= MGPMrPackageDepends( property, path );
- 			rControllerCleanUp( &localProperty );
- 			MGPMlogDestroy( property );
- 			return( 0 );
-diff -ruN ../0.3.9_5/libMGPM/src/MGPMrStatus.c ./libMGPM/src/MGPMrStatus.c
---- ../0.3.9_5/libMGPM/src/MGPMrStatus.c	Tue Nov 29 18:31:42 2005
-+++ ./libMGPM/src/MGPMrStatus.c	Fri Dec  2 12:06:43 2005
-@@ -305,7 +305,7 @@
- 						property->fieldInstalledPortsDbPortName ) );
- 
- 
--				fprintf( stdout, "%05d have:%-35s %-35s OLD avalable: %s\n",
-+				fprintf( stdout, "%05d have:%-35s %-35s OLD available: %s\n",
- 					counter,
- 			 		installedPortsDbPortName,
- 			 		installedPortsDbPortDir,
-diff -ruN ../0.3.9_5/portmanager/pkgtools-to-portmanager.rb ./portmanager/pkgtools-to-portmanager.rb
---- ../0.3.9_5/portmanager/pkgtools-to-portmanager.rb	Tue Nov 29 18:31:42 2005
-+++ ./portmanager/pkgtools-to-portmanager.rb	Sat Dec  3 12:53:50 2005
-@@ -27,6 +27,11 @@
- #
- #	jan
- #
-+#
-+# if ..  end added by patch provided by:
-+# Daniel Bye <dan@slightlystrange.org>
-+# fixes not reading pkgtools.conf args when in array format
-+#
- #!/usr/local/bin/ruby
- 
- require "pkgtools"
-@@ -35,7 +40,6 @@
- 
- load_config
- 
--
- # held packages
- 
- puts ""
-@@ -43,9 +47,10 @@
- puts ""
- 
- config_value(:HOLD_PKGS).each do |pkg|
--
--	puts "IGNORE|" + pkg + "|"
--
-+	if pkg.empty?
-+		pkg = " "
-+	end  
-+	puts pkg + "|" + "#{pkg}" + "|"
- end
- 
- 
-@@ -56,9 +61,10 @@
- puts ""
- 
- config_value(:BEFOREBUILD).each do |pkg|
--
--	puts "STOP|/" + pkg[0] + " " + pkg[1] + "|"
--
-+	if pkg[1].instance_of?(Array)
-+		pkg[1] = pkg[1].join(" ")
-+	end
-+	puts "STOP|/" + pkg[0] + " " + "#{pkg[1]}" + "|"
- end
- 
- # afterinstall becomes start
-@@ -68,24 +74,25 @@
- puts ""
- 
- config_value(:AFTERINSTALL).each do |pkg|
--
--	puts "START|/" + pkg[0] + " " + pkg[1] + "|"
--
-+	if pkg[1].instance_of?(Array)
-+		pkg[1] = pkg[1].join(" ")
-+	end
-+	puts "START|/" + pkg[0] + " " + "#{pkg[1]}" + "|"
- end
- 
- # package options.
- 
--
- puts ""
- puts "# Package options from MAKE_ARGS"
- puts "# Note: pkgtools.conf will use the UNION of all matching lines"
- puts ""
- 
- config_value(:MAKE_ARGS).each do |pkg|
--
--##mcs mod##
--#	puts pkg[0] + "|" + pkg[1] + "|"
--#
--	puts pkg[0] + "|" + pkg[1] + " " + "|"
--
-+	if pkg[1].instance_of?(Array)
-+		pkg[1] = pkg[1].join(" ")
-+	end
-+	if pkg[1].empty?
-+		pkg[1] = " "
-+	end  
-+	puts pkg[0] + "|" + "#{pkg[1]}" + "|"
- end
diff -ruN portmanager/files/patch-0.3.9_7 portmanager-0.4.0/files/patch-0.3.9_7
--- portmanager/files/patch-0.3.9_7	Sat Dec  3 22:16:40 2005
+++ portmanager-0.4.0/files/patch-0.3.9_7	Wed Dec 31 16:00:00 1969
@@ -1,172 +0,0 @@
-diff -ruN ../0.3.9_6/libMGPM/src/MGPMrUpdate.c ./libMGPM/src/MGPMrUpdate.c
---- ../0.3.9_6/libMGPM/src/MGPMrUpdate.c	Sat Dec  3 14:45:00 2005
-+++ ./libMGPM/src/MGPMrUpdate.c	Sat Dec  3 17:50:47 2005
-@@ -203,17 +203,20 @@
- 			property->fieldConfigDbKey,
- 			STOP,
- 			property->fieldConfigDbKey,
--			exact )	
--		&&
--		strncmp( oldPortDir, 
--			MGdbGet( property->configDb,
--				MGdbGetRecno( property->configDb ) - 1,
--				property->fieldConfigDbValue ),
--			strlen( oldPortDir ) ) ==  0 )
-+			exact )	)
- 	{
- 		stopPortDirPtr	= MGdbGet( property->configDb,  	
- 					MGdbGetRecno( property->configDb ) - 1,
- 					property->fieldConfigDbValue );
-+
-+		if( strncmp( oldPortDir, MGdbGet( property->configDb,
-+						MGdbGetRecno( property->configDb ) - 1,
-+						property->fieldConfigDbValue ),
-+						strlen( oldPortDir ) ) )
-+		{
-+			continue;
-+		}
-+
- 		if( stopPortDirPtr[strlen( oldPortDir )] == SPACE )
- 		{
- 			strncpy( localProperty.stopPortDir, stopPortDirPtr, strlen( oldPortDir ) );
-@@ -230,17 +233,21 @@
- 			property->fieldConfigDbKey,
- 			START,
- 			property->fieldConfigDbKey,
--			exact )	
--		&&
--		strncmp( oldPortDir, 
--			MGdbGet( property->configDb,
--				MGdbGetRecno( property->configDb ) - 1,
--				property->fieldConfigDbValue ),
--			strlen( oldPortDir ) ) ==  0 )
-+			exact ) )
-+
- 	{
- 		startPortDirPtr	= MGdbGet( property->configDb,  	
- 					MGdbGetRecno( property->configDb ) - 1,
- 					property->fieldConfigDbValue );
-+
-+		if( strncmp( oldPortDir, MGdbGet( property->configDb,
-+					MGdbGetRecno( property->configDb ) - 1,
-+					property->fieldConfigDbValue ),
-+					strlen( oldPortDir ) ) )
-+		{
-+			continue;
-+		}
-+
- 		if( startPortDirPtr[strlen( oldPortDir )] == SPACE )
- 		{
- 			strncpy( localProperty.startPortDir, startPortDirPtr, strlen( oldPortDir ) );
-@@ -1082,33 +1089,9 @@
-  				pHandle	= popen( localProperty.stopPortCmd, "r" );
- 				fread( localProperty.buffer, bufferSize, 1, pHandle );
- 				pclose( pHandle );
--/*
--				idx	= 0;
--				while( idx < bufferSize )
--				{
--					if( localProperty.buffer[idx] == LINEFEED 
--						||
--						localProperty.buffer[idx] == TAB 
--						|| 
--						localProperty.buffer[idx] == SPACE )
--					{
--						localProperty.buffer[idx]	= 0;
--						break;
--					}
--					idx++;
--				}
--*/
--				if( property->log )
--				{
--					strcpy( localProperty.command, "echo \"    stopping " );
--					strcat( localProperty.command, oldPortName );
--					strcat( localProperty.command, " " );
--					strcat( localProperty.command, oldPortDir );
--					strcat( localProperty.command, " execution by running " );
--					strcat( localProperty.command, localProperty.stopPortCmd );
--					strcat( localProperty.command, " \">> /var/log/portmanager.log" );
--					system( localProperty.command );
--				}
-+
-+				MGPMlogAdd( property, "stopping ", oldPortName, oldPortDir, " execution by running ", localProperty.stopPortCmd );
-+
- 				fprintf( stdout, "%s reply: %s\n", localProperty.stopPortCmd, localProperty.buffer );
- 				while( fflush( stdout ) );
- 			}
-@@ -1264,19 +1247,6 @@
- 			system( localProperty.command );
- 		}
- 	}
--
--	/*
--	 * 5 second time delay
--	 */
--/*
--	property->STDIN = fopen( "/dev/STDIN", "r" );
--	signal( SIGALRM, MGPMrTimer );
--	alarm( 5 );
--	answer	= getc( property->STDIN );
--	alarm(0);
--	fclose( property->STDIN );
--*/
--	
- 	strcpy( localProperty.command, "cp /tmp/*.db " );
- 	strcat( localProperty.command, SHAREDIR );
- 	fprintf( stdout, "restoring databases localProperty.command:%s\n", localProperty.command );
-@@ -1298,33 +1268,8 @@
-  		pHandle	= popen( localProperty.startPortCmd, "r" );
- 		fread( localProperty.buffer, bufferSize, 1, pHandle );
- 		pclose( pHandle );
--/*
--		idx	= 0;
--		while( idx < bufferSize )
--		{
--			if( localProperty.buffer[idx] == LINEFEED 
--				||
--				localProperty.buffer[idx] == TAB 
--				|| 
--				localProperty.buffer[idx] == SPACE )
--			{
--				localProperty.buffer[idx]	= 0;
--				break;
--			}
--			idx++;
--		}
--*/
--		if( property->log )
--		{
--			strcpy( localProperty.command, "echo \"    starting " );
--			strcat( localProperty.command, oldPortName );
--			strcat( localProperty.command, " " );
--			strcat( localProperty.command, oldPortDir );
--			strcat( localProperty.command, " execution by running " );
--			strcat( localProperty.command, localProperty.startPortCmd );
--			strcat( localProperty.command, " \">> /var/log/portmanager.log" );
--			system( localProperty.command );
--		}
-+
-+		MGPMlogAdd( property, "starting ", oldPortName, oldPortDir, " execution by running ", localProperty.startPortCmd );
- 
- 		fprintf( stdout, "%s reply: %s\n", localProperty.startPortCmd, localProperty.buffer );
- 		while( fflush( stdout ) );
-@@ -1362,8 +1307,6 @@
- 		fprintf( stdout, "restoring databases localProperty.command:%s\n", localProperty.command );
- 		while( fflush( stdout ) );
- 		system( localProperty.command );
--
--
- 	}
- 	else
- 	{
-@@ -1656,9 +1599,6 @@
- 	strcat( command, curDir );
- 
- 	strcat( command, "/work 2>&1" );
--/*
--	strcat( command, "/work" );
--*/
- 	fprintf( stdout, "===>  Cleaning for %s\n", portDir );	
- 	while( fflush( stdout ) );
- 
--- portmanager-0.4.0.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?20051212153902.BDF90B93F>