ports/89716: [MAINTAINER] update sysutils/portmanager

Michael C. Shultz ringworm01 at gmail.com
Tue Nov 29 12:30:39 UTC 2005


>Number:         89716
>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 29 12:20:03 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 25 15:08:09 PST 2005 root at ringworm.mechee.com:/usr5/obj/usr5/src/sys/RINGWORM5 i386


>Description:

	update sysutils/portmanager to 0.3.9_5

	1. Fixes when adding a new port with portmanager, +CONTENTS files being corupted.
	2. Improved logging of conflicting ports

>How-To-Repeat:

	N/A

>Fix:

--- portmanager-0.3.9_5.diff begins here ---
diff -ruN portmanager/Makefile portmanager-0.3.9_5/Makefile
--- portmanager/Makefile	Sun Nov 27 23:19:25 2005
+++ portmanager-0.3.9_5/Makefile	Tue Nov 29 04:05:22 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	portmanager
 PORTVERSION=	0.3.9
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	sysutils
 MASTER_SITES=	http://portmanager.sunsite.dk/distfiles/ \
 		${MASTER_SITE_SOURCEFORGE}
diff -ruN portmanager/files/patch-0.3.9_5 portmanager-0.3.9_5/files/patch-0.3.9_5
--- portmanager/files/patch-0.3.9_5	Wed Dec 31 16:00:00 1969
+++ portmanager-0.3.9_5/files/patch-0.3.9_5	Tue Nov 29 04:05:05 2005
@@ -0,0 +1,232 @@
+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
--- portmanager-0.3.9_5.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list