mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 19:09:35 +02:00
lazbuild: fixed load package conflitc check, issue #41113
This commit is contained in:
parent
2f2884244b
commit
0e11791719
@ -536,12 +536,11 @@ begin
|
||||
|
||||
// check if Package with same name is already loaded
|
||||
ConflictPkg:=PackageGraph.FindPackageWithName(Result.Name,nil);
|
||||
if not PackageGraph.PackageCanBeReplaced(ConflictPkg,Result) then
|
||||
PrintErrorAndHalt(ErrorLoadPackageFailed,
|
||||
'Cannot replace loaded package '+ConflictPkg.IDAsString+' with '+Result.IDAsString+' from "'+Result.Filename+'"');
|
||||
|
||||
if ConflictPkg<>nil then begin
|
||||
// replace package
|
||||
if not PackageGraph.PackageCanBeReplaced(ConflictPkg,Result) then
|
||||
PrintErrorAndHalt(ErrorLoadPackageFailed,
|
||||
'Cannot replace loaded package '+ConflictPkg.IDAsString+' with '+Result.IDAsString+' from "'+Result.Filename+'"');
|
||||
PackageGraph.ReplacePackage(ConflictPkg,Result);
|
||||
end else begin
|
||||
// add to graph
|
||||
|
Loading…
Reference in New Issue
Block a user