|
Line 0
Link Here
|
|
|
1 |
diff -ruN ../0.3.9_1/libMGPM/src/MGPMrCommandLine.c ./libMGPM/src/MGPMrCommandLine.c |
| 2 |
--- ../0.3.9_1/libMGPM/src/MGPMrCommandLine.c Fri Nov 25 11:47:19 2005 |
| 3 |
+++ ./libMGPM/src/MGPMrCommandLine.c Fri Nov 25 18:58:23 2005 |
| 4 |
@@ -96,6 +96,7 @@ |
| 5 |
property.pristine = 0; /* 1 = run in pristine mode */ |
| 6 |
property.resume = 0; /* 1 = portmanager updated itself, don't rebuild databases in -u -f mode */ |
| 7 |
property.timeout = 300; /* default timeout in seconds */ |
| 8 |
+ property.NoPkgtools = 0; /* 1 = pkgtools.conf or ruby not installed */ |
| 9 |
|
| 10 |
if( argv[2] && strcmp( "package-depends", argv[2] ) == 0 ) |
| 11 |
{ |
| 12 |
diff -ruN ../0.3.9_1/libMGPM/src/MGPMrReadConfigure.c ./libMGPM/src/MGPMrReadConfigure.c |
| 13 |
--- ../0.3.9_1/libMGPM/src/MGPMrReadConfigure.c Fri Nov 25 11:47:19 2005 |
| 14 |
+++ ./libMGPM/src/MGPMrReadConfigure.c Fri Nov 25 19:06:25 2005 |
| 15 |
@@ -164,16 +164,27 @@ |
| 16 |
strcat( command, "/pkgtools.db" ); |
| 17 |
rReadConfigureAwkConfigure( property, configFileNameOld, command ); |
| 18 |
} |
| 19 |
+ else |
| 20 |
+ { |
| 21 |
+ property->NoPkgtools = 1; |
| 22 |
+ } |
| 23 |
+ } |
| 24 |
+ else |
| 25 |
+ { |
| 26 |
+ property->NoPkgtools = 1; |
| 27 |
} |
| 28 |
- |
| 29 |
strcpy( command, SHAREDIR ); |
| 30 |
strcat( command, "/pkgtools.db" ); |
| 31 |
- rReadConfigureCleanPkgToolsDb( property, command ); |
| 32 |
- strcpy( command, "cat " ); |
| 33 |
- strcat( command, SHAREDIR ); |
| 34 |
- strcat( command, "/pkgtools.db >>" ); |
| 35 |
- strcat( command, property->configDbFileName ); |
| 36 |
- system( command ); |
| 37 |
+ |
| 38 |
+ if( property->NoPkgtools == 0 ) |
| 39 |
+ { |
| 40 |
+ rReadConfigureCleanPkgToolsDb( property, command ); |
| 41 |
+ strcpy( command, "cat " ); |
| 42 |
+ strcat( command, SHAREDIR ); |
| 43 |
+ strcat( command, "/pkgtools.db >>" ); |
| 44 |
+ strcat( command, property->configDbFileName ); |
| 45 |
+ system( command ); |
| 46 |
+ } |
| 47 |
|
| 48 |
/* |
| 49 |
strcpy( command, "rm -f " ); |
| 50 |
@@ -441,8 +452,16 @@ |
| 51 |
|
| 52 |
value = calloc( 0xfff, 1 ); |
| 53 |
|
| 54 |
- pkgtoolsDb = MGdbOpen( pkgtoolsFileName ); |
| 55 |
- pkgtoolsQTY = MGdbGetRecordQty( pkgtoolsDb ); |
| 56 |
+ if( MGrIfFileExist( pkgtoolsFileName ) ) |
| 57 |
+ { |
| 58 |
+ pkgtoolsDb = MGdbOpen( pkgtoolsFileName ); |
| 59 |
+ pkgtoolsQTY = MGdbGetRecordQty( pkgtoolsDb ); |
| 60 |
+ } |
| 61 |
+ else |
| 62 |
+ { |
| 63 |
+ free( value ); |
| 64 |
+ return( 1 ); |
| 65 |
+ } |
| 66 |
|
| 67 |
while( pkgtoolsIDX < pkgtoolsQTY ) |
| 68 |
{ |
| 69 |
diff -ruN ../0.3.9_1/libMGPM/src/libMGPM.h ./libMGPM/src/libMGPM.h |
| 70 |
--- ../0.3.9_1/libMGPM/src/libMGPM.h Fri Nov 25 11:47:19 2005 |
| 71 |
+++ ./libMGPM/src/libMGPM.h Fri Nov 25 18:57:49 2005 |
| 72 |
@@ -146,7 +146,8 @@ |
| 73 |
char* configConfFileName; |
| 74 |
char* helpFile; |
| 75 |
int timeOut; /* see MGPMrGetPortName.c */ |
| 76 |
- |
| 77 |
+ int NoPkgtools; /* 1 = pkgtools.conf or ruby not installed */ |
| 78 |
+ |
| 79 |
/* |
| 80 |
* data base structures/file names/fieldnames |
| 81 |
*/ |