summaryrefslogtreecommitdiff
path: root/pcr-testing
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2023-09-15 09:02:35 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-09-15 09:31:14 -0400
commitd5a37be5d25b605a3896c6245d818bcd2614d57e (patch)
tree5031a4a0ac08f9793e0faecd22b94731accee88f /pcr-testing
parent0707bfd6d1c76ca3f3174026b2473fbaff00eadc (diff)
housekeeping - nornmalize _version_constraint() implementations across PKGBUILDs
Diffstat (limited to 'pcr-testing')
-rw-r--r--pcr-testing/calamares/PKGBUILD17
1 files changed, 9 insertions, 8 deletions
diff --git a/pcr-testing/calamares/PKGBUILD b/pcr-testing/calamares/PKGBUILD
index 6c27f1e6e..962cd6416 100644
--- a/pcr-testing/calamares/PKGBUILD
+++ b/pcr-testing/calamares/PKGBUILD
@@ -30,7 +30,7 @@ _version_constraint() # (dep_pkgname [precision])
local n_dots=$(tmp=${full_version%-*} ; tmp=${tmp//[^\.]} ; echo "${#tmp}" ;)
local def_precision=$(( n_dots + 1 ))
local is_prec_valid=$(( req_precision > 0 && req_precision <= def_precision ))
- local precision=$( (( is_prec_valid )) && echo ${req_precision} || echo ${def_precision} )
+ local precision=$((( is_prec_valid )) && echo ${req_precision} || echo ${def_precision})
local pkgver_rx='[0-9A-Za-z_]+'
pkgver_rx=$(sed 's|\]|\+]|' <<<${pkgver_rx}) # according to the wiki, '+' is not allowed,
# but some pkgver have it (eg: 5.15.10+kde+r130)
@@ -39,16 +39,16 @@ _version_constraint() # (dep_pkgname [precision])
local garbage_rx='[^0-9].*'
local capture_rx=${pkgver_rx}
for (( n_dots=1 ; n_dots < precision ; ++n_dots )) ; do capture_rx+=${subver_rx} ; done ;
- local version pkgrel has_split_char version_min version_max constraint_string
+ local version pkgrel has_dot_char version_min version_max constraint_string
declare -i subver subver_inc pkgrel_inc
if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-(${pkgrel_rx}).*$ ]]
then version=${BASH_REMATCH[1]} # pkgver cut to the requested precision
#unused=${BASH_REMATCH[2]} # discarded pkgver segments
pkgrel=${BASH_REMATCH[3]} # pkgrel with non-numerics right-trimmed
- has_split_char=$(grep '\.' <<<${version} &> /dev/null ; echo $((! $?)) ; )
+ has_dot_char=$([[ "${version}" =~ \. ]] ; echo $(( ! $? )) ; )
subver=$(sed "s|${garbage_rx}||" <<<${version##*.}) # right-trim from any non-numeric
- version=$( ((has_split_char)) && echo ${version%.*}.${subver} || echo ${subver} )
+ version=$( (( has_dot_char )) && echo ${version%.*}.${subver} || echo ${subver} )
subver_inc=$(( subver + 1 ))
pkgrel_inc=$(( pkgrel + 1 ))
version_min=$( (( ! is_prec_valid )) && echo ${full_version%-*}-${pkgrel} || \
@@ -93,10 +93,11 @@ build()
package()
{
- depends+=( $(_version_constraint 'boost-libs') \
- $(_version_constraint 'icu' ) \
- $(_version_constraint 'kpmcore' ) \
- $(_version_constraint 'qt5-base' ) )
+ # pin to strongly-coupled dependency versions
+ depends=( ${depends[*]/boost-libs/} $(_version_constraint 'boost-libs') )
+ depends=( ${depends[*]/icu/} $(_version_constraint 'icu' ) )
+ depends=( ${depends[*]/kpmcore/} $(_version_constraint 'kpmcore' ) )
+ depends=( ${depends[*]/qt5-base/} $(_version_constraint 'qt5-base' ) )
cd "${srcdir}"/${pkgname}/build