mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit b0bd025a5ff869e846a351adb68799f221861259
parent 65ef11a8d042db4101b16da3c9e4af090bb29841
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Wed, 14 Jun 2023 00:24:44 +0200

Store build information

Diffstat:
Mcommand/pthbs-build | 4++--
Mcommand/pthbs-install | 15+++++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/command/pthbs-build b/command/pthbs-build @@ -11,7 +11,7 @@ pthbs_package=${pthbs_package%%:*}.$bsh if test -f "make/package.sha256.${bsh}.env"; then envfile="make/package.sha256.${bsh}.env" envhash=$(pthbs-getenvhash "$envfile") || exit $? - envdir=$HOME/versions/env.$envhash + export pthbs_build_environment=$HOME/versions/env.$envhash fi mkdir -p "$workdir" @@ -19,7 +19,7 @@ env \ basedir="$basedir" \ workdir="$workdir" \ script="$script" \ - envdir="$envdir" \ + envdir="$pthbs_build_environment" \ awk -v single_quote="'" >"$workdir/pthbs-setup" ' BEGIN { sandbox = 1 diff --git a/command/pthbs-install b/command/pthbs-install @@ -30,4 +30,19 @@ if test -e "$pthbs_versions/$pthbs_package"; then find "$pthbs_versions" -type l ! -exec test -e {} \; -exec rm -v {} + fi +buildinfo=$pthbs_versions/${pthbs_package%/}.buildinfo +if test -e "$buildinfo"; then + rm -r "$buildinfo" +fi +mkdir -p "$buildinfo" +builddir=$(dirname "$pthbs_destdir") +if test -e "$builddir/build.log"; then + mv "$builddir/build.log" "$buildinfo/log" + bzip2 "$buildinfo/log" +fi + +if test -n "$pthbs_build_environment"; then + ln -s "$pthbs_build_environment" "$buildinfo/env" +fi + mv "$pthbs_destdir/${pthbs_versions%/}/$pthbs_package" "$pthbs_versions/$pthbs_package"