ruby: Install certificate for +openssl only (#11184)

If specifying ~openssl, the post-install step will still try to install
the non-existent certificate, leading to an IOError.
This commit is contained in:
Oliver Breitwieser 2019-04-17 20:03:58 +02:00 committed by Adam J. Stewart
parent c628ca99cf
commit f276b3ffa0

View File

@ -96,13 +96,14 @@ def post_install(self):
http://guides.rubygems.org/ssl-certificate-update/ http://guides.rubygems.org/ssl-certificate-update/
for details. for details.
""" """
rubygems_updated_cert_path = join_path(self.stage.source_path, if self.spec.satisfies("+openssl"):
'rubygems-updated-ssl-cert', rubygems_updated_cert_path = join_path(self.stage.source_path,
'GlobalSignRootCA.pem') 'rubygems-updated-ssl-cert',
rubygems_certs_path = join_path(self.spec.prefix.lib, 'GlobalSignRootCA.pem')
'ruby', rubygems_certs_path = join_path(self.spec.prefix.lib,
'{0}.0'.format(self.spec.version. 'ruby',
up_to(2)), '{0}.0'.format(self.spec.version.
'rubygems', up_to(2)),
'ssl_certs') 'rubygems',
install(rubygems_updated_cert_path, rubygems_certs_path) 'ssl_certs')
install(rubygems_updated_cert_path, rubygems_certs_path)