diff options
-rwxr-xr-x | mgagnome | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -384,7 +384,7 @@ class SpecFile(object): re_rm_buildroot = r'^(?:rm|\%\{__rm\}) *(?:-rf|-rf|-r) *(?:\%buildroot|\%\{buildroot\}|\$RPM_BUILDROOT|\$RPM_BUILD_ROOT) *\n' re_clean_spec = [ # remove %defattr - ('remove defattr', re.compile(r'(?P<keeppre>^\%files[^\n]*\n)^\%defattr\(-, *root, *root\)\s*\n(?P<keeppost>)', re.MULTILINE + re.IGNORECASE)), + ('remove defattr', re.compile(r'(?P<keeppre>^\%files[^\n]*\n)^\%defattr\(-, *root, *root(?:, *-)?\)\s*\n', re.MULTILINE + re.IGNORECASE)), ('remove cleaning buildroot in install', re.compile(r'(?P<keeppre>^\%install[^\n]*\n)' + re_rm_buildroot + r'\n?(?P<keeppost>)', re.MULTILINE + re.IGNORECASE)), ('remove clean section', re.compile(r'(?P<keeppre>)^\%clean[^\n]*\n' + re_rm_buildroot + r'\n*(?P<keeppost>^(?:\%files|\%post|\%preun))', re.MULTILINE + re.IGNORECASE)) ] |