]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
pakfire: Import latest patches from upstream.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Oct 2012 18:53:03 +0000 (20:53 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Oct 2012 18:53:03 +0000 (20:53 +0200)
pakfire/pakfire.nm
pakfire/patches/0007-QA-Remove-obsoleted-python-hardlink-tool.patch [new file with mode: 0644]
pakfire/patches/0008-py-compile-Make-script-more-robust-for-errors.patch [new file with mode: 0644]

index d862b326c233ef47c3443b14839cb9b3e3acc371..501e9cc931d302edc2d7759651bfa123e198f1ed 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pakfire
 version    = 0.9.23
-release    = 3
+release    = 4
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = System/Packaging
diff --git a/pakfire/patches/0007-QA-Remove-obsoleted-python-hardlink-tool.patch b/pakfire/patches/0007-QA-Remove-obsoleted-python-hardlink-tool.patch
new file mode 100644 (file)
index 0000000..869118d
--- /dev/null
@@ -0,0 +1,39 @@
+From 99c47627b24f5a16897aa85ed83eb3919ea6ea85 Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Wed, 3 Oct 2012 01:02:06 +0200
+Subject: [PATCH 7/8] QA: Remove obsoleted python hardlink tool.
+
+---
+ tools/quality-agent.d/090-python-hardlinks | 20 --------------------
+ 1 file changed, 20 deletions(-)
+ delete mode 100755 tools/quality-agent.d/090-python-hardlinks
+
+diff --git a/tools/quality-agent.d/090-python-hardlinks b/tools/quality-agent.d/090-python-hardlinks
+deleted file mode 100755
+index e2abf76..0000000
+--- a/tools/quality-agent.d/090-python-hardlinks
++++ /dev/null
+@@ -1,20 +0,0 @@
+-#!/bin/bash
+-
+-. $(dirname ${0})/qa-include
+-
+-DESC="Python byte-code files could be hardlinked if the optimized one is equal"
+-DESC="${DESC} to the other one."
+-
+-function check() {
+-      for py in $(find ${BUILDROOT} -type f -name "*.py"); do
+-              if [ -e "${py}c" ] && [ -e "${py}o" ]; then
+-                      if cmp -s "${py}c" "${py}o"; then
+-                              log DEBUG "  ${py}c -> ${py}o"
+-                              ln -f "${py}c" "${py}o"
+-                      fi
+-              fi
+-      done
+-}
+-
+-run
+-
+-- 
+1.7.11.4
+
diff --git a/pakfire/patches/0008-py-compile-Make-script-more-robust-for-errors.patch b/pakfire/patches/0008-py-compile-Make-script-more-robust-for-errors.patch
new file mode 100644 (file)
index 0000000..59c3922
--- /dev/null
@@ -0,0 +1,45 @@
+From 61918bfab20eaba61bb8ce7e8397a28806d029d2 Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer@ipfire.org>
+Date: Wed, 3 Oct 2012 14:56:41 +0200
+Subject: [PATCH 8/8] py-compile: Make script more robust for errors.
+
+---
+ tools/py-compile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tools/py-compile b/tools/py-compile
+index 5ccd8f9..2749042 100755
+--- a/tools/py-compile
++++ b/tools/py-compile
+@@ -33,14 +33,18 @@ tempfile=$(mktemp)
+ trap "rm -f ${tempfile}" EXIT
+ cat > ${tempfile} <<EOF
++import os
+ import py_compile
+ import sys
+ for file in sys.argv[1:]:
++      if not os.path.exists(file):
++              continue
++
+       py_compile.compile(file, doraise=0)
+ EOF
+-filelist=$(find ${paths} -type f -a -name "*.py")
++filelist=$(find ${paths} -type f -a -name "*.py" 2>/dev/null)
+ # Compile with optimization.
+ ${python_interpreter} -O ${tempfile} ${filelist}
+@@ -49,7 +53,7 @@ ${python_interpreter} -O ${tempfile} ${filelist}
+ ${python_interpreter} ${tempfile} ${filelist}
+ # Hardlink identical files.
+-for pyc in $(find ${paths} -type f -a -name "*.pyc"); do
++for pyc in $(find ${paths} -type f -a -name "*.pyc" 2>/dev/null); do
+       pyo="${pyc/.pyc/.pyo}"
+       if cmp -s "${pyc}" "${pyo}"; then
+-- 
+1.7.11.4
+