public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - error out on uncompilable python code (Tim Waugh)
@ 2026-11-23 9:25 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:25 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 86a7924cebf01fca0098766876f458617228e4d2
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2009-02-20T18:38:44+00:00
Stats : +23/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/86a7924cebf01fca0098766876f458617228e4d2?branch=pmatilai-v6
Log:
- error out on uncompilable python code (Tim Waugh)
---
diff --git a/rpm-4.6.0-python-validate.patch b/rpm-4.6.0-python-validate.patch
new file mode 100644
index 0000000..61d9873
--- /dev/null
+++ b/rpm-4.6.0-python-validate.patch
@@ -0,0 +1,17 @@
+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
diff --git a/rpm.spec b/rpm.spec
index 2930a05..0719829 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -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 @@ Patch202: rpm-4.6.0-anyarch-actions-fix.patch
# 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 @@ that will manipulate RPM packages and databases.
%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 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Fri Feb 20 2009 Panu Matilainen <pmatilai@redhat.com> - 4.6.0-6
+- error out on uncompilable python code (Tim Waugh)
+
* Tue Feb 17 2009 Jindrich Novy <jnovy@redhat.com> - 4.6.0-5
- remove two offending hunks from anyarch patch causing that
RPMTAG_BUILDARCHS isn't written to SRPMs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:25 [rpms/rpm] pmatilai-v6: - error out on uncompilable python code (Tim Waugh) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox