From e5c3b07f6632c6a5fab40bb7b5732767aafdf2bf Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 18 Feb 2022 14:26:34 -0500 Subject: [PATCH] Added BUILD_UNTIL mechanism to config --- README.md | 1 + helpers/config | 5 +++++ helpers/make-mate-calc | 1 + 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 3a58015..5ab8008 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Those are the steps done by the helpers: * `REPOKEY`: An additional GPG key to import for the helper. Mostly only used in conjunction with `EXTERNAL`. * `BACKPORT(S)`: Must be set to `true` if the package is a backport. * `QUILT`: If `skip`, avoids patches to be automatically applied. Only set this variables if you know what you are doing. +* `BUILD_UNTIL`: build this helper if the Trisquel REVISION number (e.g. Trisquel 10.0) is <= this number. To be used when we know that the helper will not be needed at a certain future release. ## Recommendations diff --git a/helpers/config b/helpers/config index dbf6642..e09f6c7 100755 --- a/helpers/config +++ b/helpers/config @@ -49,6 +49,11 @@ MIRROR=http://archive.ubuntu.com/ubuntu LOCALMIRROR=https://archive.trisquel.org/trisquel LOCAL_APT=`mktemp -d` +if [ -n "$BUILD_UNTIL" ] && (( $(echo "$BUILD_UNTIL $REVISION" | awk '{print ($1 > $2)}') )); then + echo "Skipping build of helper with BUILD_UNTIL=$BUILD_UNTIL > REVISION=$REVISION" + exit 0 +fi + export RPL="$PWD/DATA/rpl" rpl(){ $RPL "$@" diff --git a/helpers/make-mate-calc b/helpers/make-mate-calc index 7801740..8744031 100644 --- a/helpers/make-mate-calc +++ b/helpers/make-mate-calc @@ -19,6 +19,7 @@ # VERSION=0 +BUILD_UNTIL=10.0 . ./config