D4493: buildrpm: fix embarassing bug in shell variable expansions
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Sep 5 20:40:22 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
`$distance_$node` looks up and concatenates `$distance_` and
`$node`. `$distance_` is empty, so we were getting the node without
the distance. Using the curly braces makes our intent explicit and
produces better-versioned RPMS.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4493
AFFECTED FILES
contrib/packaging/buildrpm
CHANGE DETAILS
diff --git a/contrib/packaging/buildrpm b/contrib/packaging/buildrpm
--- a/contrib/packaging/buildrpm
+++ b/contrib/packaging/buildrpm
@@ -59,7 +59,7 @@
fi
if [ -n "$distance" ] ; then
- release=$release+$distance_$node
+ release=$release+${distance}_${node}
fi
if [ "$PYTHONVER" ]; then
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list