SynologyOpenSource / pkgscripts-ng

Synology DSM6.0 package toolkit framework
162 stars 56 forks source link

CheckProjectStatus is too restrictive #33

Open mzanetti opened 3 years ago

mzanetti commented 3 years ago

I'm trying to build some more complex projects and generally I'm getting through, but I've got some builds failing because of CheckProjectStatus being too restrictive.

There are build scripts which test stuff and cause error messages in the log but those errors are not critical. Still the tools fails on those.

Commenting the call out in include/build gets me past this.

mzanetti commented 3 years ago
diff --git a/include/build b/include/build
index 8a25760..aad6b1d 100644
--- a/include/build
+++ b/include/build
@@ -426,7 +426,7 @@ RunBuildScript() # {{{
        INFO "======= Run build script ======="
        (. $buildScript)

-       CheckProjectStatus build $proj > /dev/null
+       #CheckProjectStatus build $proj > /dev/null
        return
 } # }}}

@@ -442,7 +442,7 @@ PackProjectDeb() {
                find "$DebDevDir" -name '*.la' | xargs rm -rf
                cp -r "$DebDevDir"/* "$ToolChainSysRoot"
        fi
-       CheckProjectStatus build $proj > /dev/null
+       #CheckProjectStatus build $proj > /dev/null
 }

diff --git a/include/check b/include/check
index d003c30..0e9f504 100644
--- a/include/check
+++ b/include/check
@@ -130,6 +130,7 @@ CheckErrorLog()
        for proj in $projectList; do
                logFile="${LogDir}/${proj}.$logType"
                result=$(CheckProjectStatus $logType $proj)
+                result=0
                ret=$?
                if [ $ret -eq 1 ]; then
                        echo "Result file $logFile doesn't exist or isn't readable." 2>&1 | tee -a $errorFile

This is a patch for the build scripts that breaks error detection but alllows to build Qt and nymea. Make sure to verify build results yourself from the logs if using those patches as actual errors might go unnoticed.

IMO the packagescripts need to be fixed to fail on bad exit code from the build/install scripts, but not care about their actual printed output.