* log packages installed both global and local

git-svn-id: trunk@10241 -
This commit is contained in:
peter 2008-02-07 21:55:08 +00:00
parent dc23783859
commit aafabe4bb2
4 changed files with 17 additions and 7 deletions

View File

@ -293,12 +293,12 @@ begin
end;
LoadLocalMirrors;
LoadLocalRepository;
FindInstalledPackages(FPMakeCompilerOptions);
FindInstalledPackages(FPMakeCompilerOptions,true);
CheckFPMakeDependencies;
// We only need to reload the status when we use a different
// configuration for compiling fpmake
if GlobalOptions.CompilerConfig<>GlobalOptions.FPMakeCompilerConfig then
FindInstalledPackages(CompilerOptions);
FindInstalledPackages(CompilerOptions,true);
if ParaPackages.Count=0 then
begin

View File

@ -129,7 +129,8 @@ begin
DownloadFile(PackagesURL,GlobalOptions.LocalPackagesFile);
// Read the repository again
LoadLocalRepository;
FindInstalledPackages(CompilerOptions);
// no need to log errors again
FindInstalledPackages(CompilerOptions,False);
Result:=true;
end;

View File

@ -72,6 +72,7 @@ Resourcestring
SLogFPMKUnitDepTooOld = 'Minimum version of %s is not installed, using internal fpmkunit with limited functionality';
SLogSelectedMirror = 'Selected mirror "%s"';
SLogUpgradingConfig = 'Configuration file "%s" is updated with new configuration settings';
SLogPackageMultipleLocations = 'Multiple installations found for package %s, using installation "%s"';
SDbgFound = 'Found';
SDbgNotFound = 'Not Found';

View File

@ -12,7 +12,7 @@ function GetRemoteRepositoryURL(const AFileName:string):string;
procedure LoadLocalMirrors;
procedure LoadLocalRepository;
procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions);
procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions;showdups:boolean=true);
procedure CheckFPMakeDependencies;
procedure ListLocalRepository(all:boolean=false);
@ -189,7 +189,7 @@ begin
end;
procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions);
procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions;showdups:boolean=true);
function LoadOrCreatePackage(const AName:string):TFPPackage;
begin
@ -213,6 +213,12 @@ procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions);
{$warning TODO Add date to check recompile}
V:=L.Values['version'];
APackage.InstalledVersion.AsString:=V;
// Log packages found in multiple locations (local and global) ?
if not APackage.InstalledVersion.Empty then
begin
if showdups then
Log(vlInfo,SLogPackageMultipleLocations,[APackage.Name,ExtractFilePath(AFileName)]);
end;
Finally
L.Free;
end;
@ -271,10 +277,12 @@ procedure FindInstalledPackages(ACompilerOptions:TCompilerOptions);
begin
CurrentRepository.ClearStatus;
if ACompilerOptions.LocalUnitDir<>'' then
CheckUnitDir(ACompilerOptions.LocalUnitDir);
// First scan the global directory
// The local directory will overwrite the versions
if ACompilerOptions.GlobalUnitDir<>'' then
CheckUnitDir(ACompilerOptions.GlobalUnitDir);
if ACompilerOptions.LocalUnitDir<>'' then
CheckUnitDir(ACompilerOptions.LocalUnitDir);
end;