summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2018-02-20 21:20:33 +0100
committerOlav Vitters <olav@vitters.nl>2018-02-20 21:20:33 +0100
commitcf8290acc2b943c8eb9c9018c8c2af65c19c6f21 (patch)
treec5ec9edf95aefaa2eb8ca2dac337d00544fca44a
parent21a305f987170831cb6ea91e283d38550e4a30d4 (diff)
downloadmgagnome-cf8290acc2b943c8eb9c9018c8c2af65c19c6f21.tar
mgagnome-cf8290acc2b943c8eb9c9018c8c2af65c19c6f21.tar.gz
mgagnome-cf8290acc2b943c8eb9c9018c8c2af65c19c6f21.tar.bz2
mgagnome-cf8290acc2b943c8eb9c9018c8c2af65c19c6f21.tar.xz
mgagnome-cf8290acc2b943c8eb9c9018c8c2af65c19c6f21.zip
assorted fixes
-rwxr-xr-xmgagnome6
1 files changed, 4 insertions, 2 deletions
diff --git a/mgagnome b/mgagnome
index a91894e..00f7cd6 100755
--- a/mgagnome
+++ b/mgagnome
@@ -361,6 +361,8 @@ class SpecFile(object):
('restrict what libraries are matched with major numbers', r'\g<keeppre>{,.*}', re.compile(r'^(?P<keeppre>%{_libdir}[^\n]+})\*$', re.MULTILINE)),
('keep library matching using two lines', r'\g<keeppre>\n\g<keeppre>.*', re.compile(r'^(?P<keeppre>%{_libdir}[^\n]+})$\n(?P=keeppre)\{,\.\*\}$', re.MULTILINE)),
('make use of autopatch', r'%autopatch -p1', re.compile(r'^%apply_patches$', re.MULTILINE)),
+ ('change find_lang --with-help into --with-gnome', '\g<keeppre> --with-gnome\g<keeppost>', re.compile(r'^(?P<keeppre>\s*\%find_lang[^\\\n]+) --with-help(?P<keeppost>[^\\\n]*\n)', re.MULTILINE + re.IGNORECASE)),
+ ('change find_lang remove duplicate with_gnome', None, re.compile(r'^(?P<keeppre>\%find_lang[^\\\n]+ --with-gnome) --with-gnome(?P<keeppost>[^\\\n]*\n)', re.MULTILINE + re.IGNORECASE)),
# Use new Python macros
('use new Python macros', r'%py2_build', re.compile(r'^%{__python} setup.py build$', re.MULTILINE)),
('use new Python macros', r'%py3_build', re.compile(r'^%{__python3} setup.py build$', re.MULTILINE)),
@@ -450,7 +452,7 @@ class SpecFile(object):
def _clean_spec_patches(self, f, made_changes, data):
re_autopatch = re.compile(r'^[ \t]*\%autopatch(?:[ \t]+-p(?P<strip>[0-9]+))?$', re.MULTILINE)
- re_patch_header = re.compile('^\Patch(?P<nr>[0-9]*)[ \t]*:[ \t]*(?P<filename>[^\n]+)\n', re.MULTILINE + re.IGNORECASE)
+ re_patch_header = re.compile('^Patch(?P<nr>[0-9]*)[ \t]*:[ \t]*(?P<filename>[^\n]+)\n', re.MULTILINE + re.IGNORECASE)
re_patch_any = re.compile(r'^[ \t]*\%patch(?P<nr>[0-9]*)', re.MULTILINE)
re_patch_valid = re.compile(r'^[ \t+]*\%patch(?P<nr>[0-9]*)(?:[ \t]+-p(?P<strip>[0-9]+))?(?:[ \t]+-b[ \t]+\S+)?$\n?', re.MULTILINE)
re_prep_patches = re.compile(r'^\%setup[^\n]+$(?:' + re_patch_valid.pattern + r'|^#[^%\n]+\n|^[ \t]*(?:%{_bindir}/|%_bindir)?autoreconf[ \t][^\n]+$|\s)+\n\%build', re.MULTILINE)
@@ -1083,7 +1085,7 @@ class Downstream(object):
if spec_only:
cmd.append('-s')
cmd.append(package)
- return subprocess.check_call(cmd, cwd=cwd)
+ return subprocess.check_call(cmd, stdin=subprocess.DEVNULL, cwd=cwd)
@classmethod
@retry(subprocess.CalledProcessError)