Commit de04ac26 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

component/perl: fix post-make-hook

we always had the following warning:

INFO WARNING - several libperl.a found, taking only the first one: /srv/slapgrid/slappart71/srv/runner/shared/perl/aa50bea02bee72b0d400aaaa07ffd490/lib/5.28.1/x86_64-linux-thread-multi/CORE/libperl.a
INFO /srv/slapgrid/slappart71/srv/runner/shared/perl/aa50bea02bee72b0d400aaaa07ffd490/.build/perl-5.28.1/libperl.a
INFO Created symlink "libs-c" to lib/5.28.1/x86_64-linux-thread-multi/CORE

Depending on the order of the list, the link could point to broken
".build" path.
parent 9d85d630
Pipeline #27419 failed with stage
in 0 seconds
......@@ -31,7 +31,7 @@ configure-command =
-Dusethreads
environment =
PATH=${patch:location}/bin:${xz-utils:location}/bin:%(PATH)s
post-make-hook = ${:_profile_base_location_}/perl-create-libs-symlink.py#943453b7d3ff8d49ed12d44a7f7076ee:post_make_hook
post-make-hook = ${:_profile_base_location_}/perl-create-libs-symlink.py#8a2cae20c74f93c2bab2c82564aeeaca:post_make_hook
[perl-CPAN-package]
......
......@@ -6,7 +6,8 @@ def post_make_hook(options, buildout):
location = options['location']
matches = [os.path.join(root, filename)
for root, dirnames, filenames in os.walk(location)
for filename in fnmatch.filter(filenames, 'libperl.a')]
for filename in fnmatch.filter(filenames, 'libperl.a')
if '.build' not in root]
if not matches:
raise UserError("ERROR - no libperl.* found!")
if len(matches) > 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment