Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 8 Dec 2009 13:58:51 +0000 (15:58 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 8 Dec 2009 14:06:44 +0000 (16:06 +0200)
- If a pattern doesn't match, we'd prefer an empty list instead of
  unexpanded garbage thank you... nullglob shell option is just what the
  doctor ordered but unfortunately its a bash-specific thing. Otoh there
  are number of other bash-specific scripts in rpm so probably not
  much of an issue...

scripts/brp-python-bytecompile

index 1faa6db..9fac5a7 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # If using normal root, avoid changing anything.
 if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
@@ -32,6 +32,7 @@ fi
 # For example, below /usr/lib/python2.6/, we're targetting /usr/bin/python2.6
 # and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1
 
+shopt -s nullglob
 for python_libdir in $RPM_BUILD_ROOT/usr/lib*/python*/ ;
 do
        python_binary=/usr/bin/$(basename $python_libdir)