rpms/rpm/devel rpm-4.6.0-python-validate.patch, NONE, 1.1 rpm.spec, 1.328, 1.329
Panu Matilainen
pmatilai at fedoraproject.org
Fri Feb 20 18:39:15 UTC 2009
Author: pmatilai
Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6616
Modified Files:
rpm.spec
Added Files:
rpm-4.6.0-python-validate.patch
Log Message:
- error out on uncompilable python code (Tim Waugh)
rpm-4.6.0-python-validate.patch:
--- NEW FILE rpm-4.6.0-python-validate.patch ---
diff -up rpm-4.6.0/scripts/brp-python-bytecompile.validate rpm-4.6.0/scripts/brp-python-bytecompile
--- rpm-4.6.0/scripts/brp-python-bytecompile.validate 2009-02-20 20:31:30.000000000 +0200
+++ rpm-4.6.0/scripts/brp-python-bytecompile 2009-02-20 20:31:37.000000000 +0200
@@ -20,7 +20,12 @@ if [ -z "$depth" -o "$depth" -le "1" ];
fi
# Generate normal (.pyc) byte-compiled files.
-$python -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' > /dev/null
+$python -c 'import compileall, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, quiet=1))'
+if [ $? != 0 ]; then
+ # One or more of the files has a syntax error.
+ exit 1
+fi
+
# Generate optimized (.pyo) byte-compiled files.
$python -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1)' > /dev/null
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.328
retrieving revision 1.329
diff -u -r1.328 -r1.329
--- rpm.spec 17 Feb 2009 07:39:46 -0000 1.328
+++ rpm.spec 20 Feb 2009 18:38:44 -0000 1.329
@@ -18,7 +18,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -42,6 +42,7 @@
# These are not yet upstream
Patch300: rpm-4.6.0-extra-provides.patch
+Patch301: rpm-4.6.0-python-validate.patch
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@@ -178,6 +179,7 @@
%patch202 -p1 -b .anyarch-actions-fix
%patch300 -p1 -b .extra-prov
+%patch301 -p1 -b .python-bytecompile
%if %{with int_bdb}
ln -s db-%{bdbver} db
@@ -377,6 +379,9 @@
%doc doc/librpm/html/*
%changelog
+* Fri Feb 20 2009 Panu Matilainen <pmatilai at redhat.com> - 4.6.0-6
+- error out on uncompilable python code (Tim Waugh)
+
* Tue Feb 17 2009 Jindrich Novy <jnovy at redhat.com> - 4.6.0-5
- remove two offending hunks from anyarch patch causing that
RPMTAG_BUILDARCHS isn't written to SRPMs
More information about the fedora-extras-commits
mailing list