Blame rpm-4.7.90-python-bytecompile.patch
|
Panu Matilainen |
a4433b |
commit 3ffc0373c4db9824a72a6356d04d862e51f42be0
|
|
Panu Matilainen |
a4433b |
Author: Panu Matilainen <pmatilai@redhat.com>
|
|
Panu Matilainen |
a4433b |
Date: Tue Dec 8 15:58:51 2009 +0200
|
|
Panu Matilainen |
a4433b |
|
|
Panu Matilainen |
a4433b |
Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
|
|
Panu Matilainen |
a4433b |
- If a pattern doesn't match, we'd prefer an empty list instead of
|
|
Panu Matilainen |
a4433b |
unexpanded garbage thank you... nullglob shell option is just what the
|
|
Panu Matilainen |
a4433b |
doctor ordered but unfortunately its a bash-specific thing. Otoh there
|
|
Panu Matilainen |
a4433b |
are number of other bash-specific scripts in rpm so probably not
|
|
Panu Matilainen |
a4433b |
much of an issue...
|
|
Panu Matilainen |
a4433b |
(cherry picked from commit d6bda5a1665d8d04526aea299781570ee7486b2e)
|
|
Panu Matilainen |
a4433b |
|
|
Panu Matilainen |
a4433b |
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
|
|
Panu Matilainen |
a4433b |
index 1faa6db..9fac5a7 100644
|
|
Panu Matilainen |
a4433b |
--- a/scripts/brp-python-bytecompile
|
|
Panu Matilainen |
a4433b |
+++ b/scripts/brp-python-bytecompile
|
|
Panu Matilainen |
a4433b |
@@ -1,4 +1,4 @@
|
|
Panu Matilainen |
a4433b |
-#!/bin/sh
|
|
Panu Matilainen |
a4433b |
+#!/bin/bash
|
|
Panu Matilainen |
a4433b |
|
|
Panu Matilainen |
a4433b |
# If using normal root, avoid changing anything.
|
|
Panu Matilainen |
a4433b |
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
|
Panu Matilainen |
a4433b |
@@ -32,6 +32,7 @@ fi
|
|
Panu Matilainen |
a4433b |
# For example, below /usr/lib/python2.6/, we're targetting /usr/bin/python2.6
|
|
Panu Matilainen |
a4433b |
# and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1
|
|
Panu Matilainen |
a4433b |
|
|
Panu Matilainen |
a4433b |
+shopt -s nullglob
|
|
Panu Matilainen |
a4433b |
for python_libdir in $RPM_BUILD_ROOT/usr/lib*/python*/ ;
|
|
Panu Matilainen |
a4433b |
do
|
|
Panu Matilainen |
a4433b |
python_binary=/usr/bin/$(basename $python_libdir)
|