summaryrefslogtreecommitdiff
path: root/recipes/meta
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2010-02-03 17:20:56 -0500
committerDenys Dmytriyenko <denis@denix.org>2010-02-03 17:20:56 -0500
commit3817a99cb61d7ae32c58b59b56e2eb68de30d6b3 (patch)
tree25757f2ba572e2c4492fcc2ef400b79706dcb79d /recipes/meta
parent376fae85db2359bca34818303bf017db3849a071 (diff)
meta-toolchain: introduce TOOLCHAIN_TARGET_EXCLUDE to uninstall unneeded deps
TOOLCHAIN_TARGET_EXCLUDE is a list of packages to uninstall from the target portion of meta-toolchain/SDK, which were brought as dependencies, but not needed in the SDK. Useful to have only relevant libPKG and PKG-dev packages with libs and headers installed, while keeping the main PKG package with binaries out. Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Diffstat (limited to 'recipes/meta')
-rw-r--r--recipes/meta/meta-toolchain.bb9
1 files changed, 9 insertions, 0 deletions
diff --git a/recipes/meta/meta-toolchain.bb b/recipes/meta/meta-toolchain.bb
index e09778f82c..a8c27ecfda 100644
--- a/recipes/meta/meta-toolchain.bb
+++ b/recipes/meta/meta-toolchain.bb
@@ -14,6 +14,7 @@ IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKPATH}/${TARGE
TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
+TOOLCHAIN_TARGET_EXCLUDE ?= ""
FEED_ARCH ?= "${TARGET_ARCH}"
SDK_SUFFIX = "toolchain"
TOOLCHAIN_OUTPUTNAME ?= "${DISTRO}-${DISTRO_VERSION}-${FEED_ARCH}-${TARGET_OS}-${SDK_SUFFIX}"
@@ -56,10 +57,18 @@ do_populate_sdk() {
${IPKG_TARGET} update
${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
+ # Remove packages in the exclude list which were installed by dependencies
+ if [ ! -z "${TOOLCHAIN_TARGET_EXCLUDE}" ]; then
+ ${IPKG_TARGET} remove -force-depends ${TOOLCHAIN_TARGET_EXCLUDE}
+ fi
+
install -d ${SDK_OUTPUT}/${SDKPATH}/usr/lib/opkg
mv ${SDK_OUTPUT}/usr/lib/opkg/* ${SDK_OUTPUT}/${SDKPATH}/usr/lib/opkg/
rm -Rf ${SDK_OUTPUT}/usr/lib
+ # Clean up empty directories from excluded packages
+ find ${SDK_OUTPUT} -depth -type d -empty -print0 | xargs -0 /bin/rmdir
+
install -d ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}
install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATH}/${TARGET_SYS}/${sysconfdir}/