1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

- Fixes stupid bug introduced in 0.2.4_1 where portmanager overwrites its own

config file the first time it is run after being installed.

PR:		ports/76779
Submitted by:	Michael C. Shultz <reso3w83@verizon.net> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-01-28 23:19:55 +00:00
parent c63e8b7aad
commit f5cc0595c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127568
4 changed files with 58 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= portmanager
PORTVERSION= 0.2.4
PORTREVISION= 1
PORTREVISION= 2
#-----------------------------------------
#for local use, remove before submitting PR
CATEGORIES= sysutils
@ -40,7 +40,7 @@ CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
INSTALLS_SHLIB= yes
USE_REINPLACE= yes
# Need INSTALL_TARGET to install /usr/local/etc/portmanager/pm-020.conf.SAMPLE
INSTALL_TARGET= install info
INSTALL_TARGET= install info
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \

View File

@ -0,0 +1,27 @@
diff -ruN ./libMG/src/MGrIfFileExist.c ../portmanager-0.2.5/libMG/src/MGrIfFileExist.c
--- ./libMG/src/MGrIfFileExist.c Tue Jan 18 19:30:53 2005
+++ ../portmanager-0.2.5/libMG/src/MGrIfFileExist.c Thu Jan 27 17:47:19 2005
@@ -27,8 +27,9 @@
int MGrIfFileExist( char* fileName )
{
FILE* fileStream = NULL;
-
- if( ( fileStream = fopen( fileName, "r") ) )
+
+ fileStream = fopen( fileName, "r");
+ if( fileStream )
{
fclose( fileStream );
return( 1 ); /* file does exist */
diff -ruN ./libPMGR/src/PMGRrReadConfigure.c ../portmanager-0.2.5/libPMGR/src/PMGRrReadConfigure.c
--- ./libPMGR/src/PMGRrReadConfigure.c Wed Jan 26 22:00:03 2005
+++ ../portmanager-0.2.5/libPMGR/src/PMGRrReadConfigure.c Thu Jan 27 17:52:49 2005
@@ -112,7 +112,7 @@
/***************************************************************************/
/* if pm-020.conf missing then copy pm-020.conf.SAMPLE to pm-020.conf */
/***************************************************************************/
- if( !MGrIfFileExist( property->configDbFileName ) )
+ if( !MGrIfFileExist( property->configConfFileName ) )
{
stringSize = strlen( "cp " )
+ strlen( property->configConfFileName )

View File

@ -7,7 +7,7 @@
PORTNAME= portmanager
PORTVERSION= 0.2.4
PORTREVISION= 1
PORTREVISION= 2
#-----------------------------------------
#for local use, remove before submitting PR
CATEGORIES= sysutils
@ -40,7 +40,7 @@ CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
INSTALLS_SHLIB= yes
USE_REINPLACE= yes
# Need INSTALL_TARGET to install /usr/local/etc/portmanager/pm-020.conf.SAMPLE
INSTALL_TARGET= install info
INSTALL_TARGET= install info
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \

View File

@ -0,0 +1,27 @@
diff -ruN ./libMG/src/MGrIfFileExist.c ../portmanager-0.2.5/libMG/src/MGrIfFileExist.c
--- ./libMG/src/MGrIfFileExist.c Tue Jan 18 19:30:53 2005
+++ ../portmanager-0.2.5/libMG/src/MGrIfFileExist.c Thu Jan 27 17:47:19 2005
@@ -27,8 +27,9 @@
int MGrIfFileExist( char* fileName )
{
FILE* fileStream = NULL;
-
- if( ( fileStream = fopen( fileName, "r") ) )
+
+ fileStream = fopen( fileName, "r");
+ if( fileStream )
{
fclose( fileStream );
return( 1 ); /* file does exist */
diff -ruN ./libPMGR/src/PMGRrReadConfigure.c ../portmanager-0.2.5/libPMGR/src/PMGRrReadConfigure.c
--- ./libPMGR/src/PMGRrReadConfigure.c Wed Jan 26 22:00:03 2005
+++ ../portmanager-0.2.5/libPMGR/src/PMGRrReadConfigure.c Thu Jan 27 17:52:49 2005
@@ -112,7 +112,7 @@
/***************************************************************************/
/* if pm-020.conf missing then copy pm-020.conf.SAMPLE to pm-020.conf */
/***************************************************************************/
- if( !MGrIfFileExist( property->configDbFileName ) )
+ if( !MGrIfFileExist( property->configConfFileName ) )
{
stringSize = strlen( "cp " )
+ strlen( property->configConfFileName )