Description: Fixed crash when trying to recompile packages.
Some packages do not need to be recompiled. There was a bug in lazbuild
when trying to guess package output directory in this special case.
Now, we just skip recompilation if it is not needed.
Author: Abou Al Montacir <abou.almontacir@sfr.fr>
Last-Update: Mon, 25 Dec 2023 16:02:09 +0100
---
lazarus/packager/packagesystem.pas | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lazarus/packager/packagesystem.pas b/lazarus/packager/packagesystem.pas
index e2c6c080..e36eefff 100644
--- a/lazarus/packager/packagesystem.pas
+++ b/lazarus/packager/packagesystem.pas
@@ -4221,6 +4221,10 @@ begin
pcfSkipDesignTimePackages in Flags,
pcfGroupCompile in Flags,
NeedBuildAllFlag,Note);
+ if Result = mrNo then begin
+ DebugLn(['Info: (lazarus) [CompilePackage]: CheckIfPackageNeedsCompilation returned mrNo for package ', APackage.IDAsString]);
+ Exit(mrOk);
+ end;
if Note<>'' then
Note:='Compile reason: '+Note;
if (pcfOnlyIfNeeded in Flags) then begin
--
2.39.2