From 813fab89ba424408da95b8be0351dfe3ac1e2856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Thu, 25 Jun 2009 17:21:10 +0000 Subject: fix EXCLUDE_FROM_STRIP issue dealing with more than just one pattern, which would result in files being stripped even when they should've been excluded (cause of mdv bug #51374) --- Makefile | 2 +- NEWS | 5 +++++ strip_and_check_elf_files | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 30401ab..b23c032 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE = spec-helper -VERSION = 0.30.4 +VERSION = 0.30.5 SVNPATH = svn+ssh://svn.mandriva.com/svn/soft/rpm/$(PACKAGE) SCRIPT_FILES = clean_files clean_perl compress_files strip_and_check_elf_files \ diff --git a/NEWS b/NEWS index dca787c..0f02fc7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +2009-06-25 Per Øyvind Karlsen 0.30.5 + * fix EXCLUDE_FROM_STRIP issue dealing with more than just one pattern, + which would result in files being stripped even when they should've been + excluded (cause of mdv bug #51374) + 2009-05-14 Guillaume Rousse 0.30.4 * skip PDF files when fixing end of lines (mdv bug #51128) * initial test suite diff --git a/strip_and_check_elf_files b/strip_and_check_elf_files index b11e099..c3c5301 100755 --- a/strip_and_check_elf_files +++ b/strip_and_check_elf_files @@ -22,8 +22,9 @@ sub strip_files { my @to_strip = (@shared_libs, @executables); if ($ENV{EXCLUDE_FROM_STRIP}) { - my $exclude_pattern = qr/$ENV{EXCLUDE_FROM_STRIP}/; - @to_strip = grep { !/$exclude_pattern/ } @to_strip; + my $exclude_pattern = join('|', split(/\s+/, $ENV{EXCLUDE_FROM_STRIP})); + my $compiled_pattern = qr/($exclude_pattern)/; + @to_strip = grep { !/$compiled_pattern/ } @to_strip; } system( -- cgit v1.2.1