From a4433ba9bb4834978767171bc99303040c6d2d3b Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Dec 08 2009 14:13:12 +0000 Subject: - fix noise from python bytecompile on non-python packages (#539635) --- diff --git a/rpm-4.7.90-python-bytecompile.patch b/rpm-4.7.90-python-bytecompile.patch new file mode 100644 index 0000000..4fc210a --- /dev/null +++ b/rpm-4.7.90-python-bytecompile.patch @@ -0,0 +1,30 @@ +commit 3ffc0373c4db9824a72a6356d04d862e51f42be0 +Author: Panu Matilainen +Date: Tue Dec 8 15:58:51 2009 +0200 + + Avoid noise from python bytecompile on non-python pkgs (RhBug:539635) + - 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... + (cherry picked from commit d6bda5a1665d8d04526aea299781570ee7486b2e) + +diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile +index 1faa6db..9fac5a7 100644 +--- a/scripts/brp-python-bytecompile ++++ b/scripts/brp-python-bytecompile +@@ -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) diff --git a/rpm.spec b/rpm.spec index 357292c..f10144c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 0.%{snapver}.1 +Release: 0.%{snapver}.2 Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -37,6 +37,7 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch Patch3: rpm-4.7.90-fedora-specspo.patch # Patches already in upstream +Patch200: rpm-4.7.90-python-bytecompile.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -190,6 +191,8 @@ packages on a system. %patch2 -p1 -b .gstreamer-prov %patch3 -p1 -b .fedora-specspo +%patch200 -p1 -b .python-bytecompile + %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -403,6 +406,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.2 +- fix noise from python bytecompile on non-python packages (#539635) + * Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.1 - update to 4.8.0-beta1 (http://rpm.org/wiki/Releases/4.8.0) - rpm-build conflicts with current ocaml-runtime