summaryrefslogtreecommitdiffstats
path: root/mgagnome
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2014-07-04 16:03:07 +0200
committerOlav Vitters <olav@vitters.nl>2014-07-04 16:03:07 +0200
commita6ee305b16eab78cb77688b16983872498716bdf (patch)
tree41e279b58885e30bb3674e97d0f073686635817e /mgagnome
parentaa4c61d56bda6e6c17a9407e98a95c8615f96316 (diff)
downloadmgagnome-a6ee305b16eab78cb77688b16983872498716bdf.tar
mgagnome-a6ee305b16eab78cb77688b16983872498716bdf.tar.gz
mgagnome-a6ee305b16eab78cb77688b16983872498716bdf.tar.bz2
mgagnome-a6ee305b16eab78cb77688b16983872498716bdf.tar.xz
mgagnome-a6ee305b16eab78cb77688b16983872498716bdf.zip
clean more unneeded defattr statements
Diffstat (limited to 'mgagnome')
-rwxr-xr-xmgagnome2
1 files changed, 1 insertions, 1 deletions
diff --git a/mgagnome b/mgagnome
index bbf8ba3..1145575 100755
--- a/mgagnome
+++ b/mgagnome
@@ -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))
]