Ver Fonte

* log configuration settings

git-svn-id: trunk@11953 -
peter há 17 anos atrás
pai
commit
efeafa36aa
4 ficheiros alterados com 54 adições e 4 exclusões
  1. 7 1
      utils/fppkg/fppkg.pp
  2. 17 0
      utils/fppkg/pkgmessages.pp
  3. 29 3
      utils/fppkg/pkgoptions.pp
  4. 1 0
      utils/fppkg/pkgrepos.pp

+ 7 - 1
utils/fppkg/fppkg.pp

@@ -92,7 +92,9 @@ begin
   if GeneratedConfig then
     Log(vlDebug,SLogGeneratingGlobalConfig,[cfgfile])
   else
-    Log(vlDebug,SLogLoadingGlobalConfig,[cfgfile])
+    Log(vlDebug,SLogLoadingGlobalConfig,[cfgfile]);
+  // Log configuration
+  GlobalOptions.LogValues;
 end;
 
 
@@ -129,6 +131,8 @@ begin
       else
         Error(SErrMissingCompilerConfig,[S]);
     end;
+  // Log compiler configuration
+  CompilerOptions.LogValues('');
   // Load FPMake compiler config, this is normally the same config as above
   S:=GlobalOptions.CompilerConfigDir+GlobalOptions.FPMakeCompilerConfig;
   if FileExists(S) then
@@ -140,6 +144,8 @@ begin
     end
   else
     Error(SErrMissingCompilerConfig,[S]);
+  // Log compiler configuration
+  FPMakeCompilerOptions.LogValues('fpmake-building ');
 end;
 
 

+ 17 - 0
utils/fppkg/pkgmessages.pp

@@ -78,6 +78,23 @@ Resourcestring
   SLogPackageDependency      = 'Dependency on package %s %s, installed %s, available %s  (%s)';
   SLogPackageChecksumChanged = 'Package %s needs to be rebuild, dependency %s is modified';
 
+  SLogGlobalCfgHeader        = 'Using global configuration:';
+  SLogGlobalCfgRemoteMirrorsURL = ' RemoteMirrorsURL: "%s"';
+  SLogGlobalCfgRemoteRepository = ' RemoteRepository: "%s"';
+  SLogGlobalCfgLocalRepository = ' LocalRepository: "%s"';
+  SLogGlobalCfgBuildDir      = ' BuildDir: "%s"';
+  SLogGlobalCfgArchivesDir   = ' ArchivesDir: "%s"';
+  SLogGlobalCfgCompilerConfigDir = ' CompilerConfigDir: "%s"';
+  SLogGlobalCfgDefaultCompilerConfig = ' DefaultCompilerConfig: "%s"';
+  SLogGlobalCfgFPMakeCompilerConfig = ' FPMakeCompilerConfig: "%s"';
+  SLogGlobalCfgDownloader    = ' Downloader: "%s"';
+  SLogCompilerCfgHeader      = 'Using %scompiler configuration:';
+  SLogCompilerCfgCompiler    = ' Compiler: "%s"';
+  SLogCompilerCfgTarget      = ' Target: "%s"';
+  SLogCompilerCfgVersion     = ' Version: "%s"';
+  SLogCompilerCfgGlobalInstallDir = ' GlobalInstallDir: "%s"';
+  SLogCompilerCfgLocalInstallDir = ' LocalInstallDir: "%s"';
+
   SDbgFound                  = 'Found';
   SDbgNotFound               = 'Not Found';
   SDbgDirectoryExists        = 'Directory "%s" %s';

+ 29 - 3
utils/fppkg/pkgoptions.pp

@@ -55,6 +55,7 @@ Type
     Procedure InitGlobalDefaults;
     Procedure LoadGlobalFromFile(const AFileName : String);
     Procedure SaveGlobalToFile(const AFileName : String);
+    procedure LogValues;
     Property Dirty : Boolean Read FDirty;
     Property ConfigVersion : Integer read FConfigVersion;
     function LocalPackagesFile:string;
@@ -100,6 +101,7 @@ Type
     Procedure InitCompilerDefaults;
     Procedure LoadCompilerFromFile(const AFileName : String);
     Procedure SaveCompilerToFile(const AFileName : String);
+    procedure LogValues(const ACfgName:string);
     Property Dirty : Boolean Read FDirty;
     Property ConfigVersion : Integer read FConfigVersion;
     Function LocalUnitDir:string;
@@ -295,9 +297,7 @@ begin
               Error(SErrUnsupportedConfigVersion,[AFileName]);
           end;
         FRemoteMirrorsURL:=ReadString(SDefaults,KeyRemoteMirrorsURL,FRemoteMirrorsURL);
-{$warning Temporary Config check, can be removed in March-2008}
-        if FConfigVersion>=1 then
-          FRemoteRepository:=ReadString(SDefaults,KeyRemoteRepository,FRemoteRepository);
+        FRemoteRepository:=ReadString(SDefaults,KeyRemoteRepository,FRemoteRepository);
         FLocalRepository:=ReadString(SDefaults,KeyLocalRepository,FLocalRepository);
         FBuildDir:=FixPath(ReadString(SDefaults,KeyBuildDir,FBuildDir));
         FArchivesDir:=FixPath(ReadString(SDefaults,KeyArchivesDir,FArchivesDir));
@@ -341,6 +341,21 @@ begin
 end;
 
 
+procedure TGlobalOptions.LogValues;
+begin
+  Log(vlDebug,SLogGlobalCfgHeader);
+  Log(vlDebug,SLogGlobalCfgRemoteMirrorsURL,[FRemoteMirrorsURL]);
+  Log(vlDebug,SLogGlobalCfgRemoteRepository,[FRemoteRepository]);
+  Log(vlDebug,SLogGlobalCfgLocalRepository,[FLocalRepository]);
+  Log(vlDebug,SLogGlobalCfgBuildDir,[FBuildDir]);
+  Log(vlDebug,SLogGlobalCfgArchivesDir,[FArchivesDir]);
+  Log(vlDebug,SLogGlobalCfgCompilerConfigDir,[FCompilerConfigDir]);
+  Log(vlDebug,SLogGlobalCfgDefaultCompilerConfig,[FDefaultCompilerConfig]);
+  Log(vlDebug,SLogGlobalCfgFPMakeCompilerConfig,[FFPMakeCompilerConfig]);
+  Log(vlDebug,SLogGlobalCfgDownloader,[FDownloader]);
+end;
+
+
 {*****************************************************************************
                            TCompilerOptions
 *****************************************************************************}
@@ -524,6 +539,17 @@ begin
 end;
 
 
+procedure TCompilerOptions.LogValues(const ACfgName:string);
+begin
+  Log(vlDebug,SLogCompilerCfgHeader,[ACfgName]);
+  Log(vlDebug,SLogCompilerCfgCompiler,[FCompiler]);
+  Log(vlDebug,SLogCompilerCfgTarget,[MakeTargetString(CompilerCPU,CompilerOS)]);
+  Log(vlDebug,SLogCompilerCfgVersion,[FCompilerVersion]);
+  Log(vlDebug,SLogCompilerCfgGlobalInstallDir,[FGlobalInstallDir]);
+  Log(vlDebug,SLogCompilerCfgLocalInstallDir,[FLocalInstallDir]);
+end;
+
+
 initialization
   GlobalOptions:=TGlobalOptions.Create;
   CompilerOptions:=TCompilerOptions.Create;

+ 1 - 0
utils/fppkg/pkgrepos.pp

@@ -294,6 +294,7 @@ procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions;showdups:boole
       begin
         Log(vlDebug,SLogFindInstalledPackages,[AUnitDir]);
         repeat
+writeln(SR.Name);
           if ((SR.Attr and faDirectory)=faDirectory) and (SR.Name<>'.') and (SR.Name<>'..') then
             begin
               UD:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(AUnitDir)+SR.Name);