Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] [V3 resend] external-python-tarball: code refactoring
@ 2013-02-20  6:06 Kang Kai
  2013-02-20  6:06 ` [PATCH 1/1] " Kang Kai
  0 siblings, 1 reply; 2+ messages in thread
From: Kang Kai @ 2013-02-20  6:06 UTC (permalink / raw)
  To: sgw; +Cc: Zhenfeng.Zhao, openembedded-core

Rebase to latest master.

The following changes since commit c7b23ab68aafc04d9830ef318015912e5d4f0672:

  maintainers.inc: update ownership of recipes (2013-02-17 22:33:30 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib kangkai/external-python
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/external-python

Kang Kai (1):
  external-python-tarball: code refactoring

 meta/recipes-core/meta/external-python-tarball.bb |   67 +-------------------
 1 files changed, 4 insertions(+), 63 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] external-python-tarball: code refactoring
  2013-02-20  6:06 [PATCH 0/1] [V3 resend] external-python-tarball: code refactoring Kang Kai
@ 2013-02-20  6:06 ` Kang Kai
  0 siblings, 0 replies; 2+ messages in thread
From: Kang Kai @ 2013-02-20  6:06 UTC (permalink / raw)
  To: sgw; +Cc: Zhenfeng.Zhao, openembedded-core

external-python-tarball only can be built when inherit package_ipk now.
Update it to reuse existed populate sdk code that it could be built for
rpm and deb too.

Remove var DEPENDS, SDK_* and flags of do_populate_sdk because they are
already defined in populate_sdk bbclasses.

[Yocto 3006]

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/recipes-core/meta/external-python-tarball.bb |   67 +-------------------
 1 files changed, 4 insertions(+), 63 deletions(-)

diff --git a/meta/recipes-core/meta/external-python-tarball.bb b/meta/recipes-core/meta/external-python-tarball.bb
index 2085acc..2513cf6 100644
--- a/meta/recipes-core/meta/external-python-tarball.bb
+++ b/meta/recipes-core/meta/external-python-tarball.bb
@@ -3,17 +3,9 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-DEPENDS = "opkg-native opkg-utils-native virtual/fakeroot-native sed-native"
+PR = "r2"
 
-PR = "r1"
-
-inherit meta
-
-SDK_DIR = "${WORKDIR}/sdk"
-SDK_OUTPUT = "${SDK_DIR}/image"
-SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
-
-IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
+TOOLCHAIN_TARGET_TASK ?= ""
 
 TOOLCHAIN_HOST_TASK ?= "\
     nativesdk-python-core \
@@ -43,56 +35,5 @@ RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
 
 EXCLUDE_FROM_WORLD = "1"
 
-do_populate_sdk() {
-	rm -rf ${SDK_OUTPUT}
-	mkdir -p ${SDK_OUTPUT}
-	mkdir -p ${SDK_OUTPUT}${localstatedir}/lib/opkg/
-
-	rm -f ${IPKGCONF_TARGET}
-	touch ${IPKGCONF_TARGET}
-	rm -f ${IPKGCONF_SDK}
-	touch ${IPKGCONF_SDK}
-
-	package_update_index_ipk
-	package_generate_ipkg_conf
-
-	for arch in ${PACKAGE_ARCHS}; do
-		revipkgarchs="$arch $revipkgarchs"
-	done
-
-	${IPKG_HOST} update
-	${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK}
-
-	install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg
-	mv ${SDK_OUTPUT}/var/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg/
-	rm -Rf ${SDK_OUTPUT}/var
-
-	install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
-	install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
-
-	rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
-
-	# Link the ld.so.cache file into the hosts filesystem
-	ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
-
-	# Add version information
-	versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
-	touch $versionfile
-	echo 'Distro: ${DISTRO}' >> $versionfile
-	echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
-	echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
-	echo 'Timestamp: ${DATETIME}' >> $versionfile
-
-	# Package it up
-	mkdir -p ${SDK_DEPLOY}
-	cd ${SDK_OUTPUT}
-	tar  --owner=root --group=root -cj --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
-}
-
-do_populate_sdk[nostamp] = "1"
-do_populate_sdk[recrdeptask] = "do_package_write"
-addtask populate_sdk before do_build after do_install
-
-inherit blacklist
-
-PNBLACKLIST[external-python-tarball] = "${@base_contains('PACKAGE_CLASSES', 'package_ipk', '', 'This recipe requires \'package_ipk\' support to be enabled in PACKAGE_CLASSES.', d)}"
+inherit meta
+inherit populate_sdk
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-20  6:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20  6:06 [PATCH 0/1] [V3 resend] external-python-tarball: code refactoring Kang Kai
2013-02-20  6:06 ` [PATCH 1/1] " Kang Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox