Patchwork [3/4] distutils: Bandaid against wrong libdir computation

login
register
mail settings
Submitter Nitin A Kamble
Date Jan. 21, 2012, 6:25 a.m.
Message ID <c67c0ece1b10afa54447af5a350aa17659abbae5.1327127051.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/19923/
State New
Headers show

Comments

Nitin A Kamble - Jan. 21, 2012, 6:25 a.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

fix python-* recipes install path for some of the files in libdir

This fixes issues like these:

WARNING: For recipe python-pyrex, the following files/directories were
installed but not shipped in any package:
WARNING:   /usr/share
WARNING:   /usr/share/lib
WARNING:   /usr/share/lib/python2.7
WARNING:   /usr/share/lib/python2.7/site-packages
WARNING:   /usr/share/lib/python2.7/site-packages/Pyrex
WARNING:   /usr/share/lib/python2.7/site-packages/Pyrex/Compiler
WARNING:
/usr/share/lib/python2.7/site-packages/Pyrex/Compiler/Lexicon.pickle

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/classes/distutils.bbclass |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 79b962a..b6383ac 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -66,6 +66,13 @@  distutils_do_install() {
             mv -f ${D}${datadir}/share/* ${D}${datadir}/
         fi
 
+        #
+        # FIXME: Bandaid against wrong libdir computation
+        #
+        if test -e ${D}${datadir}/lib; then
+            cp -r -f ${D}${datadir}/lib/* ${D}${libdir}/
+            rm -rf ${D}${datadir}/lib/
+        fi
         # These are generated files, on really slow systems the storage/speed trade off
         # might be worth it, but in general it isn't 
         find ${D}${libdir}/${PYTHON_DIR}/site-packages -iname '*.pyo' -exec rm {} \;