[omd-commits] OMD Git: omd: python: Fix build issues when using "make build_cached"

git version control git at mathias-kettner.de
Tue Jul 12 23:29:29 CEST 2016


Module:   omd
Branch:   master
Commit:   b3e1636df875b71906f78437cb6ffe602d8820a0
URL:      http://omdistro.org/projects/omd/repository/revisions/b3e1636df875b71906f78437cb6ffe602d8820a0

Author:   Lars Michelsen <lm at larsmichelsen.com>
Date:     Tue Jul 12 23:29:21 2016 +0200
Commiter: Lars Michelsen <lm at larsmichelsen.com>
Date:     Tue Jul 12 23:29:21 2016 +0200

python: Fix build issues when using "make build_cached"

---

 build_cached |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/build_cached b/build_cached
index e7602cd..fcae162 100755
--- a/build_cached
+++ b/build_cached
@@ -30,6 +30,18 @@ if test -e "$CACHE_FILE"; then
             rm -f "$file.tmp"
         fi
     done
+
+    # The version is hard coded in OMD Python binary, fix that.
+    if [ $SRC = python ]; then
+        BIN_RPATH=$(strings python/tmp.python27/bin/python2.7 | grep ^/omd/versions)
+        NEW_RPATH=/omd/versions/$OMD_VERSION/lib
+        if [ ${#BIN_RPATH} -ne ${#NEW_RPATH} ]; then
+            echo "python: Can't replace rpath (different length: $BIN_RPATH, $NEW_RPATH). Use chrpath or patchelf to fix this."
+            exit 1
+        fi
+        sed -i "s%$BIN_RPATH%$NEW_RPATH%g" python/tmp.python27/bin/python2.7
+    fi
+
     exit 0
 fi
 EXCLUDES_FILE=$(mktemp)



More information about the omd-commits mailing list