summaryrefslogtreecommitdiff
path: root/recipes/openssl.recipe
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-19 17:22:04 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-06-19 18:03:38 +0530
commit7e241147f661ba15813770cbd15ae21bc52c64de (patch)
tree336fcb2493c49c314c236faf59174d4618885440 /recipes/openssl.recipe
parent5ee773886659874e2c1b7521ee3220167e016627 (diff)
openssl.recipe: Fix perl version checking
check_call doesn't always inherit the current environment, so it would run the wrong Perl because our PATH changes were ignored. However, this only happened in a `package` run where some other recipe was built beforehand. Instead, use `which()` now so that we read PATH directly. Also don't use environment variables to communicate the perl path, we already have that information in self.config.
Diffstat (limited to 'recipes/openssl.recipe')
-rw-r--r--recipes/openssl.recipe10
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/openssl.recipe b/recipes/openssl.recipe
index 349e3a29..77939bb4 100644
--- a/recipes/openssl.recipe
+++ b/recipes/openssl.recipe
@@ -101,15 +101,15 @@ class Recipe(recipe.Recipe):
if self.config.platform == Platform.WINDOWS:
# Msys ships with a too-old perl, so we modify PATH to use the
# mingw-perl that was downloaded and installed by bootstrap.
- openssl_path = os.environ['CERBERO_OPENSSL_PERL_PATH']
- os.environ['PATH'] = openssl_path + ';' + os.environ['PATH']
- perl, newer = shell.check_perl_version('5.10.0')
+ openssl_path = os.path.join(self.config.mingw_perl_prefix, 'bin')
+ os.environ['PATH'] = openssl_path + ';' + os.environ['PATH']
+ perl, found, newer = shell.check_perl_version('5.10.0')
m = 'please run bootstrap again'
if newer is None:
raise FatalError('Perl not found, ' + m)
if newer is False:
- raise FatalError('Configured Perl {!r} is too old, {}'
- ''.format(perl, m))
+ raise FatalError('Configured Perl {!r} is {} which is too old, {}'
+ ''.format(perl, found, m))
# OpenSSL guesses the libdir incorrectly on x86_64
config_sh = 'perl ./Configure --prefix=' + self.config.prefix + \
' --libdir=lib' + self.config.lib_suffix + ' '