From 1b86a7408d446dc6c49d34706699b85db3d7dfc2 Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@bmw-carit.de>
Date: Wed, 12 Dec 2012 09:06:56 +0100
Subject: [PATCH] experimenting to obtain the correct easy_install.pth file

---
 meta/classes/distutils.bbclass                       | 8 ++++++--
 meta/recipes-core/images/core-image-bmw.bb           | 2 +-
 meta/recipes-devtools/python/python-rospkg_1.0.15.bb | 1 +
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index f67297e..0b41723 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -58,8 +58,12 @@ distutils_do_install() {
                 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
             done
         fi
-
-        rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
+        
+        if test -e ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth; then
+            echo "easy-install.pth exists"
+            cat ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
+        fi
+        # rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth
         
         #
         # FIXME: Bandaid against wrong datadir computation
diff --git a/meta/recipes-core/images/core-image-bmw.bb b/meta/recipes-core/images/core-image-bmw.bb
index 0fc2e3f..949e076 100644
--- a/meta/recipes-core/images/core-image-bmw.bb
+++ b/meta/recipes-core/images/core-image-bmw.bb
@@ -13,4 +13,4 @@ IMAGE_ROOTFS_EXTRA_SPACE = "524288"
 # remove not needed ipkg informations
 ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "
 
-IMAGE_INSTALL += "boost boost-dev packagegroup-core-ssh-openssh dhcp-client file ldd python-modules python-setuptools python-rospkg python-rosinstall git cmake python-empy python-pyyaml python-nose log4cxx log4cxx-dev libbz2-dev"
+IMAGE_INSTALL += "boost boost-dev packagegroup-core-ssh-openssh dhcp-client file ldd python-modules python-rospkg python-rosinstall git cmake python-empy python-pyyaml python-nose log4cxx log4cxx-dev libbz2-dev python-setuptools"
diff --git a/meta/recipes-devtools/python/python-rospkg_1.0.15.bb b/meta/recipes-devtools/python/python-rospkg_1.0.15.bb
index 476e117..45f7ba9 100644
--- a/meta/recipes-devtools/python/python-rospkg_1.0.15.bb
+++ b/meta/recipes-devtools/python/python-rospkg_1.0.15.bb
@@ -3,6 +3,7 @@ SECTION = "devel/python"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://PKG-INFO;md5=083869c8da6fdf8c3a5bbd7d1bf93cac"
 SRCNAME = "rospkg"
+DEPENDS = "python-setuptools"
 
 SRC_URI = "http://pypi.python.org/packages/source/r/rospkg/rospkg-1.0.15.tar.gz"
 SRC_URI[md5sum] = "3c9b1b8d1e90950944b3f10bad16ecff"
-- 
GitLab