From e507da2daa8c1515def53f094ba24a7b0723928d Mon Sep 17 00:00:00 2001 From: "Lucas C. Villa Real" Date: Mon, 2 Jan 2017 23:15:07 -0200 Subject: [PATCH 1/2] New file: Resources/PackageSource. That file is structured as follows: [File]: stores the value of $url as featured in the recipe [Distribution]: contains the string "GoboLinux " [Host]: contains the output of "uname -a" If multiple $urls are set in the recipe, then multiple [File] lines will be output to the PackageSource file. --- bin/Compile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bin/Compile b/bin/Compile index 7b865101..75039821 100755 --- a/bin/Compile +++ b/bin/Compile @@ -144,10 +144,36 @@ function wrapup() { # Add information inside binary package Resources directory Quiet mkdir -p $target/Resources + # Respawning with Runner has its oddities. We need to evaluate the recipe + # again to get the $url info needed to write the PackageSource meta-data. + source_recipe + # Save use flags information echo "${useflags[*]}" | $sudo_exec tee "$target/Resources/UseFlags" >/dev/null || wrap_fail "Failed installing file." echo "$(Get_Architecture)" | $sudo_exec tee "$target/Resources/Architecture" >/dev/null || wrap_fail "Failed installing file." + # Save PackageSource + local distro="GoboLinux $(cat $goboSettings/GoboLinuxVersion)" + local archinfo="$(uname -a)" + local fileinfo= + if [ "${urls[*]}" ] + then fileinfo=$(printf "[File] %s\n" "${urls[@]}") + elif [ "$url" ] + then fileinfo=$(printf "[File] %s\n" "$url") + elif [ "$cvs" ] + then fileinfo=$(printf "[File] %s\n" "$cvs") + elif [ "$svn" ] + then fileinfo=$(printf "[File] %s\n" "$svn") + elif [ "$git" ] + then fileinfo=$(printf "[File] %s\n" "$git") + elif [ "$brz" ] + then fileinfo=$(printf "[File] %s\n" "$bzr") + elif [ "$hg" ] + then fileinfo=$(printf "[File] %s\n" "$hg") + fi + local pkgsource=$(printf "%s\n[Distribution] %s\n[Host] %s\n" "$fileinfo" "$distro" "$archinfo") + echo "$pkgsource" | $sudo_exec tee "$target/Resources/PackageSource" >/dev/null || wrap_fail "Failed installing PackageSource file" + Log_Normal "Generating package's build information..." GenBuildInformation --store "$appname" "$versionnumber" || wrap_fail "Failed installing build information file." From 00a24762886a41ae1e94e4e81a3d5b31a0975d03 Mon Sep 17 00:00:00 2001 From: "Lucas C. Villa Real" Date: Tue, 3 Jan 2017 23:27:13 -0200 Subject: [PATCH 2/2] Spawn Runner with -vv when Compile is invoked with --debug. --- bin/Compile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/Compile b/bin/Compile index 75039821..cb4e06b1 100755 --- a/bin/Compile +++ b/bin/Compile @@ -310,7 +310,9 @@ function respawn_with_runner() { if ! Boolean "no-build" && [ -z "$GOBOLINUX_RUNNER" ] && Quiet which Runner && Quiet Runner -c then Log_Verbose "Runner is available, using it." - if Boolean "verbose" + if Boolean "debug" + then local quiet="-vv" + elif Boolean "verbose" then local quiet= else local quiet="-q" fi