diff --git a/SpecCheck.py b/SpecCheck.py index b7de54dd..73a741d0 100644 --- a/SpecCheck.py +++ b/SpecCheck.py @@ -44,9 +44,9 @@ rm_regex = re.compile('(^|\s)((.*/)?rm|%{?__rm}?) ') rpm_buildroot_regex = re.compile('^[^#]*(?:(\\\*)\${?RPM_BUILD_ROOT}?|(%+){?buildroot}?)') configure_libdir_spec_regex = re.compile('ln |\./configure[^#]*--libdir=([^\s]+)[^#]*') lib_package_regex = re.compile('^%package.*\Wlib') -ifarch_regex = re.compile('%ifn?arch\s+') -if_regex = re.compile('%if\s+') -endif_regex = re.compile('%endif\\b') +ifarch_regex = re.compile('^\s*%ifn?arch\s') +if_regex = re.compile('^\s*%if\s') +endif_regex = re.compile('^\s*%endif\\b') biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES) hardcoded_lib_path_exceptions_regex = re.compile(Config.getOption('HardcodedLibPathExceptions', DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS)) prereq_regex = re.compile('^PreReq(\(.*\))?:\s*(.+?)\s*$', re.IGNORECASE)