I know this has already been merged, but I'm still going to comment.
On Mon, Dec 02, 2013 at 04:58:27PM +0000, Pedro Alvarez wrote:
---
openssl-new.morph | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/openssl-new.morph b/openssl-new.morph
index 2911d20..d92bba1 100644
--- a/openssl-new.morph
+++ b/openssl-new.morph
@@ -3,7 +3,12 @@ kind: chunk
max-jobs: 1
configure-commands:
- sed -i -e 's,^LIBNAMES=\\(.*\\) padlock \\(.*\\),LIBNAMES=\\1 \\2,g'
engines/Makefile
-- ./config --openssldir=/etc/ssl --prefix="${PREFIX-/usr}" --libdir=lib
shared
+- >
We usually use | for block text, rather than >. IIRC the difference is
that > merges blocks. We're just fortunate that it considers indented
text to be part of a different block, and preserves the newline.
It would get really confused if we instead had it formatted like:
if true; then
sh ./Configure
linux-ppc64 shared
fi
Since the ./Configure linux-ppc64... line is translated by yaml into
just one shell command, while if it were unmangled shell commands,
this would be two separate commands.
This works for now, but is a trap for the unwary the next time someone
has to add extra commands, since they may try to add them inside the
else block, and end up with it doing the wrong thing.
For this reason I would *STRONGLY* recommend a follow up patch to replace
the > with a |.
+ if [ "$(uname -m)" = "ppc64" ]; then
+ sh ./Configure linux-ppc64 --openssldir=/etc/ssl
--prefix="${PREFIX-/usr}" --libdir=lib shared
+ else
+ ./config --openssldir=/etc/ssl --prefix="${PREFIX-/usr}" --libdir=lib
shared
+ fi
We no longer need the ${PREFIX-/usr} fallback. This was part of a
transition from hardcoding /usr, to accepting PREFIX if it's set, to
only using PREFIX from morph.
We've just not made it a priority to clean up where we've used the
fallback, since it's a non-functional change that would cause rebuilds.