Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Feb 2005 22:11:06 -0800 (PST)
From:      "Michael C.Shultz" <reso3w83@verizon.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        non-critical@inbox.lv
Subject:   ports/77409: [MAINTAINER] sysutils/portmanager update to 0.2.6_4
Message-ID:  <20050212061106.E18B72CE740@ringworm.mechee.com>
Resent-Message-ID: <200502120620.j1C6KHlP083642@freefall.freebsd.org>

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

>Number:         77409
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/portmanager update to 0.2.6_4
>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:   Sat Feb 12 06:20:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Michael C. Shultz
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD ringworm.mechee.com 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Feb 9 04:47:24 PST 2005 root@ringworm.mechee.com:/ROUTER/obj/usr/src/sys/RINGWORM i386


>Description:

sysutils/portmanager update to 0.2.6_4

Note to committer, please add files/patch-0.2.6_4

1) Finally found and fixed the bug haunting portmanager for
the past few revisions. Portmanager now "flushes" after
droping new records into it's data bases :)

2) Improvement of database code to handle wider variety of
strings/character codes merged from another project that
uses libMG.

>How-To-Repeat:

	N/A

>Fix:

--- portmanager-0.2.6_5.diff begins here ---
diff -ruN portmanager/Makefile portmanager-0.2.6_5/Makefile
--- portmanager/Makefile	Wed Feb  9 16:01:40 2005
+++ portmanager-0.2.6_5/Makefile	Fri Feb 11 21:07:56 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	portmanager
 PORTVERSION=	0.2.6
-PORTREVISION=	3
+PORTREVISION=	4
 #-----------------------------------------
 #for local use, remove before submitting PR
 CATEGORIES=		sysutils
diff -ruN portmanager/files/patch-0.2.6_4 portmanager-0.2.6_5/files/patch-0.2.6_4
--- portmanager/files/patch-0.2.6_4	Wed Dec 31 16:00:00 1969
+++ portmanager-0.2.6_5/files/patch-0.2.6_4	Fri Feb 11 21:07:31 2005
@@ -0,0 +1,310 @@
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbAdd.c libMG/src/MGdbAdd.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbAdd.c	Tue Feb  8 21:40:10 2005
++++ libMG/src/MGdbAdd.c	Fri Feb 11 12:20:13 2005
+@@ -59,6 +59,12 @@
+ 			break;
+ 		}
+ 		fprintf( dbFileStream, "%s%c", paramPtr, 0 );
++
++		/*
++		 * prevents random LINEFEEDS!!!
++		 */
++		while( fflush( dbFileStream ) );	
++
+ 		idx++;
+ 		if(idx > db->fieldQty)
+ 		{
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbRead.c libMG/src/MGdbRead.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbRead.c	Tue Feb  8 21:40:10 2005
++++ libMG/src/MGdbRead.c	Fri Feb 11 01:10:15 2005
+@@ -73,14 +73,14 @@
+ 		assert(0);
+ 	}
+ 
+-	/***************************************************************/
+-	/* set db->fieldQty                                            */
+-	/***************************************************************/
++	/*
++	 *  set db->fieldQty
++	 */
+ 	dataBufferIdx	= 0;
+-	db->fieldQty	= 0;
+-	while( db->dataBuffer[dataBufferIdx] != LINEFEED )
++	db->fieldQty	= 1;
++	while( db->dataBuffer[dataBufferIdx] != 0 || db->dataBuffer[dataBufferIdx+1] != LINEFEED )
+ 	{
+-		if( !db->dataBuffer[dataBufferIdx] )
++		if( db->dataBuffer[dataBufferIdx] == 0 )
+ 		{
+ 			db->fieldQty++;
+ 		}
+@@ -95,23 +95,22 @@
+ 	db->parent.recordQty	= 0;
+ 	while( dataBufferIdx < dataBufferSize )
+ 	{
+-		while( db->dataBuffer[dataBufferIdx] != LINEFEED )
+-		{
+-			if( !db->dataBuffer[dataBufferIdx] )
++		if( db->dataBuffer[dataBufferIdx] == 0 )
+ 			{
+ 				db->fieldIdx++;
+-			}
+-			dataBufferIdx++;
+-		}
++			if( db->dataBuffer[dataBufferIdx+1] == LINEFEED )
++			{
++				db->parent.recordQty++;
+ 		if( db->fieldIdx != db->fieldQty )
+ 		{
+ 			fprintf( stderr, "%s error: inconsitant field count at record %d. field count is %d and should be %d\n",
+ 				id, db->parent.recordQty, db->fieldIdx, db->fieldQty );
+ 			assert(0);
+ 		}
+-		dataBufferIdx++;
+-		db->parent.recordQty++;
+ 		db->fieldIdx	= 0;
++			}
++		}
++		dataBufferIdx++;
+ 	}
+ 
+ 	/***************************************************************/
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbSeek.c libMG/src/MGdbSeek.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libMG/src/MGdbSeek.c	Tue Feb  8 21:40:10 2005
++++ libMG/src/MGdbSeek.c	Fri Feb 11 02:37:16 2005
+@@ -59,15 +59,23 @@
+ 		assert(0);
+ 	}
+ 
++	if( !db->record[0][0] )
++	{
++		fprintf( stderr, "%s error: record 0 field 0 contains nothing!\n",
++			id );
++		fprintf( stderr, "fieldName = %s\ndb->parent.recordQty = %d\ndb->fieldQty = %d\n",
++			fieldName, db->parent.recordQty, db->fieldQty );
++		assert(0);
++	}
++
+ 	db->fieldIdx	= 0;
+ 	while( strcmp( fieldName, db->record[0][db->fieldIdx] ) )
+ 	{
+ 		db->fieldIdx++;
+-		if(db->fieldIdx == db->fieldQty)
++		if( db->fieldIdx >= db->fieldQty )
+ 		{
+ 			fprintf( stderr, "%s error: field \"%s\" not found in %s\n",
+ 				id, fieldName, db->parent.path );
+-			fflush(stderr);
+ 			assert(0);
+ 		}
+ 	}	
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrAddDependencies.c ./libPMGR/src/PMGRrAddDependencies.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrAddDependencies.c	Tue Feb  8 21:40:10 2005
++++ ./libPMGR/src/PMGRrAddDependencies.c	Fri Feb 11 12:19:17 2005
+@@ -112,6 +112,17 @@
+ 
+ 		portDependencyDir--;
+ 		portDependencyDir[0]		= '/';
++/*
++ *
++ * Just a note: Turns out that I had to run while( fflush( dbFileStream ) ) in MGdbAdd to prevent
++ * random LINEFEEDS from being placed into the data base, that may pop up again somewhere so I'll
++ * leave this comment here in the hope it saves some aggravation in the future
++ *
++ */ 
++/*
++printf( "%s %s DEBUG:\nportName-=>%s\nportDependency-=>%s\nportDependencyDir-=>%s\n%s\n",
++id, VERSION, portName, portDependency, portDependencyDir, "marker" );
++*/
+ 		MGdbAdd( property->dependencyPortsDb, portName, portDependency, portDependencyDir, NULL );
+ 	}
+ 
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrDbCreate.c ./libPMGR/src/PMGRrDbCreate.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrDbCreate.c	Tue Feb  8 21:40:10 2005
++++ ./libPMGR/src/PMGRrDbCreate.c	Fri Feb 11 03:34:14 2005
+@@ -41,15 +41,6 @@
+ 	property->objIdx	= 0;
+ 
+ 	/***************************************************************/
+-	/* convert pm-020.conf to config.db                            */
+-	/***************************************************************/
+-	PMGRrReadConfigure( property );
+-
+-	/*zzzzzzzzzzzzzz*/
+-	property->objIdx++;
+-	property->configDb		= MGdbOpen( property->configDbFileName );
+-	/*zzzzzzzzzzzzzz*/
+-	/***************************************************************/
+ 	/* add any ignored ports in config.db  to ignore.db            */
+ 	/***************************************************************/
+ 	IDX_configDb	= 1;
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrDbDestroy.c ./libPMGR/src/PMGRrDbDestroy.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrDbDestroy.c	Tue Feb  8 21:40:10 2005
++++ ./libPMGR/src/PMGRrDbDestroy.c	Fri Feb 11 03:36:08 2005
+@@ -27,9 +27,6 @@
+ 	char	id[]	= "PMGRrDbDestroy";
+ 
+ 	property->objIdx--;
+-	MGdbDestroy( property->configDb );
+-
+-	property->objIdx--;
+ 	MGdbDestroy( property->installedPortsDb );
+ 
+ 	property->objIdx--;
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrShowLeavesDelete.c ./libPMGR/src/PMGRrShowLeavesDelete.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrShowLeavesDelete.c	Tue Feb  8 21:40:10 2005
++++ ./libPMGR/src/PMGRrShowLeavesDelete.c	Fri Feb 11 04:09:26 2005
+@@ -22,6 +22,11 @@
+ /************************************************************************/
+ #include	<libPMGR.h>
+ #include	<sgtty.h>
++
++int	nuke( char* leafPortDir, char* leafPortName );
++int	rebuildDb( structProperty* property, int* idx );
++int	removePort( char* leafPortName );
++
+ int	PMGRrShowLeavesDelete( structProperty* property )
+ {
+ 	char	id[]			= "PMGRrShowLeavesDelete";
+@@ -147,7 +152,7 @@
+ 				{
+ 					/* nuke() */
+ 					fprintf( stdout, "<n> Nuking %s\n\n", leafPortName );
+-					removePort( leafPortDir, leafPortName );
++					removePort( leafPortName );
+ 					nuke( leafPortDir, leafPortName );
+ 					rebuildDb( property, &idx );
+ 					break;
+@@ -156,7 +161,7 @@
+ 				{
+ 					/* nuke() */
+ 					fprintf( stdout, "<N> Nuking %s\n\n", leafPortName );
+-					removePort( leafPortDir, leafPortName );
++					removePort( leafPortName );
+ 					nuke( leafPortDir, leafPortName );
+ 					rebuildDb( property, &idx );
+ 					break;
+@@ -165,7 +170,7 @@
+ 				{
+ 					/* delete() */
+ 					fprintf( stdout, "<x> Removing %s\n\n", leafPortName );
+-					removePort( leafPortDir, leafPortName );
++					removePort( leafPortName );
+ 					rebuildDb( property, &idx );
+ 					break;
+ 				}
+@@ -173,7 +178,7 @@
+ 				{
+ 					/* delete() */
+ 					fprintf( stdout, "<X> Removing %s\n\n", leafPortName );
+-					removePort( leafPortDir, leafPortName );
++					removePort( leafPortName );
+ 					rebuildDb( property, &idx );
+ 					break;
+ 				}
+@@ -199,7 +204,7 @@
+ }
+ 
+ /***********************************************************************/
+-int	removePort( char* leafPortDir, char* leafPortName )
++int	removePort( char* leafPortName )
+ {
+ 	char*	command		= NULL;
+ 	int	stringSize	= 0;
+@@ -240,6 +245,7 @@
+  	return( 0 );
+ }
+ 
++/***********************************************************************/
+ int	rebuildDb( structProperty* property, int* idx )
+ {
+ 	int	errorCode	= 0;
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrUpgrade.c ./libPMGR/src/PMGRrUpgrade.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/libPMGR/src/PMGRrUpgrade.c	Wed Feb  9 07:27:45 2005
++++ ./libPMGR/src/PMGRrUpgrade.c	Fri Feb 11 03:44:54 2005
+@@ -56,11 +56,6 @@
+ 
+ 		/*zzzzzzzzzzzzzzzzz*/
+ 		property->objIdx++;
+-		property->configDb		= MGdbOpen( property->configDbFileName );
+-		/*zzzzzzzzzzzzzzzzz*/
+-
+-		/*zzzzzzzzzzzzzzzzz*/
+-		property->objIdx++;
+ 		property->installedPortsDb	= MGdbOpen( property->installedPortsDbFileName );
+ 		/*zzzzzzzzzzzzzzzzz*/
+ 
+@@ -324,12 +319,16 @@
+ 										property->fieldInstalledPortName,
+ 										dependencyPortName,
+ 										property->fieldInstalledPortDir );
++							/*
++							 * if !origDir then likely the dependency port has
++							 * been updated????? Going to just skip this one...
++							 */
+ 							if( !origDir )
+ 							{
+ 								fprintf( stderr, 
+ 									"%s is not located in property->installedPortsDb!\n",
+ 									dependencyPortName );
+-								assert(0);
++								continue;
+ 							}
+ 							fprintf( stdout, "\tin %s/+CONTENTS ORIG dir = %s \n\n",
+ 								dependencyPortName, origDir );
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/portmanager/portmanager.1 ./portmanager/portmanager.1
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/portmanager/portmanager.1	Tue Feb  8 21:40:08 2005
++++ ./portmanager/portmanager.1	Wed Feb  9 21:00:11 2005
+@@ -61,6 +61,29 @@
+ .It
+ \fB\&-v\fR portmanager version 
+ .El
++.sp
++ \fBWeb site\fR
++.sp
++http://portmanager.sunsite.dk/
++.sp
++ \fBMail lists\fR
++.sp
++portmanager-questions@sunsite.dk
++.sp
++To subscribe send an empty message to:
++ portmanager-questions-subscribe@sunsite.dk
++.sp
++ archive: http://www.mail-archive.com/portmanager-questions%40sunsite.dk/
++.sp
++.sp
++If you would like to joint portmanager's developement team let us know at:
++portmanager-devel@sunsite.dk
++.sp
++To subscribe send an empty message to:
++  portmanager-devel-subscribe@sunsite.dk
++.sp
++ archive: http://www.mail-archive.com/portmanager-devel%40sunsite.dk/
++.sp
+ .\"=======================================================================
+ .\".Sh IMPLEMENTATION NOTES
+ .\"=======================================================================
+diff -bBdruN --exclude=.svn --exclude=.private --exclude=PRIVATE --exclude=HTML --exclude=Makefile --exclude=Makefile.in --exclude=Makefile.am --exclude=STABLE-sysutils::Makefile --exclude=aclocal.m4 --exclude=configure --exclude=configure.ac /usr/home/mike/work/portmanager/tags/0.2.6_3/portmanager/portmanager.c ./portmanager/portmanager.c
+--- /usr/home/mike/work/portmanager/tags/0.2.6_3/portmanager/portmanager.c	Tue Feb  8 21:40:08 2005
++++ ./portmanager/portmanager.c	Fri Feb 11 04:06:15 2005
+@@ -34,7 +34,6 @@
+ void	rHelp( char* id );
+ int	main( int argc, char** argv )
+ {
+-	FILE*	handle		= NULL;
+ 	char	h[]		= "-h";
+ 	char	help[]		= "--help";
+ 	char	id[]		= "portmanager";
+@@ -113,6 +112,11 @@
+ 						property.field3strikesPortDir,
+ 						property.fieldStrikes,
+ 						NULL );
++	/*
++	 * convert pm-020.conf to config.db
++	 */
++	PMGRrReadConfigure( &property );
++	property.configDb		= MGdbOpen( property.configDbFileName );
+ 
+ 	idx	= 1;
+ 	while( idx < argc )
--- portmanager-0.2.6_5.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?20050212061106.E18B72CE740>