IDE: do not warn if installing a meta package

git-svn-id: trunk@61609 -
This commit is contained in:
mattias 2019-07-20 18:04:39 +00:00
parent 2b676c1372
commit 0e01330dd2

View File

@ -3766,9 +3766,24 @@ begin
end;
function TPackageEditors.ShouldNotBeInstalled(APackage: TLazPackage): boolean;
var
Dep: TPkgDependency;
CurPkg: TLazPackage;
begin
Result:=APackage.Missing
or ((APackage.FindUnitWithRegister=nil) and (APackage.Provides.Count=0));
if APackage.Missing then
exit(true)
else if (APackage.FindUnitWithRegister<>nil) or (APackage.Provides.Count>0) then
exit(false);
Dep:=APackage.FirstRequiredDependency;
while Dep<>nil do begin
CurPkg:=Dep.RequiredPackage;
if (CurPkg<>nil) then begin
if (CurPkg.FindUnitWithRegister<>nil) or (CurPkg.Provides.Count>0) then
exit(false);
end;
Dep:=Dep.NextRequiresDependency;
end;
Result:=true;
end;
function TPackageEditors.InstallPackage(APackage: TLazPackage): TModalResult;