Refactor external-python-tarball
cover Refactor external-python-tarball
The following changes since commit be2a1508b16b3afc89521b3fa1eb195a0c6970fe:
oprofile: set correct kernel path (2013-01-20 13:14:08 +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 (2):
createrepo-native: update dependency
external-python-tarball: code refactoring
meta/classes/populate_python_deb.bbclass | 42 +++++++++++++ meta/classes/populate_python_ipk.bbclass | 43 ++++++++++++++ meta/classes/populate_python_rpm.bbclass | 59 +++++++++++++++++++ meta/recipes-core/meta/external-python-tarball.bb | 61 ++++---------------- .../createrepo/createrepo_0.4.11.bb | 4 +- 5 files changed, 157 insertions(+), 52 deletions(-) create mode 100644 meta/classes/populate_python_deb.bbclass create mode 100644 meta/classes/populate_python_ipk.bbclass create mode 100644 meta/classes/populate_python_rpm.bbclass
Signature · 1 line
1.7.5.4
PATCH 1/2 createrepo-native: update dependency
"RDEPENDS_${PN}_class-native" doesn't work for native recipe because no -native package will be created. Then the dependencies listed here are not built when bitbake createrepo-native.
Update and use DEPENDS_class-native instead.
--- .../createrepo/createrepo_0.4.11.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-support/createrepo/createrepo_0.4.11.bb +2 -2
@@ -4,9 +4,9 @@ HOMEPAGE = "http://createrepo.baseurl.org/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" -RDEPENDS_${PN}_class-native += "libxml2-native rpm-native" +DEPENDS_class-native += "libxml2-native rpm-native" -PR = "r8" +PR = "r9" SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \ file://fix-native-install.patch \
Signature · 1 line
1.7.5.4
PATCH 2/2 external-python-tarball: code refactoring
In reply to Kang Kaiexternal-python-tarball only can be built when inherit package_ipk now. Update it and split the populate python operation to separated bbclass according the value of PACKAGE_CLASSES, then it could be built for rpm and deb too.
[Yocto 3006]
--- meta/classes/populate_python_deb.bbclass | 42 ++++++++++++++ meta/classes/populate_python_ipk.bbclass | 43 +++++++++++++++ meta/classes/populate_python_rpm.bbclass | 59 ++++++++++++++++++++ meta/recipes-core/meta/external-python-tarball.bb | 61 ++++----------------- 4 files changed, 155 insertions(+), 50 deletions(-) create mode 100644 meta/classes/populate_python_deb.bbclass create mode 100644 meta/classes/populate_python_ipk.bbclass create mode 100644 meta/classes/populate_python_rpm.bbclass
meta/classes/populate_python_deb.bbclass new file +42 -0
@@ -0,0 +1,42 @@ +do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot" +do_populate_sdk[recrdeptask] += "do_package_write_deb" + + +DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\ + [d.getVar('SDK_ARCH', True) in \ + ["x86", "i486", "i586", "i686", "pentium"]]}" + +do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock" + +populate_sdk_post_deb () { + + local target_rootfs=$1 + + mkdir -p ${target_rootfs}/etc + tar -cf - -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc +} + +populate_python_sdk () { + + # update index + package_update_index_deb + + ## install nativesdk ## + echo "Installing NATIVESDK packages" + export INSTALL_ROOTFS_DEB="${SDK_OUTPUT}" + export INSTALL_BASEARCH_DEB="${DEB_SDK_ARCH}" + export INSTALL_ARCHS_DEB="${SDK_PACKAGE_ARCHS}" + export INSTALL_PACKAGES_NORMAL_DEB="${TOOLCHAIN_HOST_TASK}" + export INSTALL_PACKAGES_ATTEMPTONLY_DEB="${TOOLCHAIN_HOST_TASK_ATTEMPTONLY}" + export PACKAGES_LINGUAS_DEB="" + export INSTALL_TASK_DEB="populate_sdk-nativesdk" + + package_install_internal_deb + populate_sdk_post_deb ${SDK_OUTPUT}/${SDKPATHNATIVE} + + #move remainings + install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg + mv ${SDK_OUTPUT}/var/lib/dpkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg + rm -rf ${SDK_OUTPUT}/var +} +
meta/classes/populate_python_ipk.bbclass new file +43 -0
43 lines not on this page · raw message
meta/classes/populate_python_rpm.bbclass new file +59 -0
59 lines not on this page · raw message
meta/recipes-core/meta/external-python-tarball.bb +11 -50
85 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Re: [PATCH 2/2] external-python-tarball: code refactoring
Quoted 8 lines · Kang Kai
external-python-tarball only can be built when inherit
package_ipknow. Update it and split the populate python operation to separated bbclass according the value ofPACKAGE_CLASSES, then it could be built for rpm and deb too.[Yocto 3006]
Signed-off-by Kang Kai <[email protected]>
Quoted 9 lines
--- meta/classes/populate_python_deb.bbclass | 42 ++++++++++++++ meta/classes/populate_python_ipk.bbclass | 43 +++++++++++++++ meta/classes/populate_python_rpm.bbclass | 59 ++++++++++++++++++++ meta/recipes-core/meta/external-python-tarball.bb | 61 ++++----------------- 4 files changed, 155 insertions(+), 50 deletions(-) create mode 100644 meta/classes/populate_python_deb.bbclass create mode 100644 meta/classes/populate_python_ipk.bbclass create mode 100644 meta/classes/populate_python_rpm.bbclass
No, sorry but this isn't right. We already have package specific functions to do these things, we should be trying to reuse those. If we can't reuse the functions, we need to improve them so we can.
Cheers,
Richard
Re: [PATCH 2/2] external-python-tarball: code refactoring
Quoted 18 lines · Richard Purdie
Quoted 14 lines · Kang Kai
external-python-tarball only can be built when inherit
package_ipknow. Update it and split the populate python operation to separated bbclass according the value ofPACKAGE_CLASSES, then it could be built for rpm and deb too.[Yocto 3006]
Signed-off-by Kang Kai<[email protected]>--- meta/classes/populate_python_deb.bbclass | 42 ++++++++++++++ meta/classes/populate_python_ipk.bbclass | 43 +++++++++++++++ meta/classes/populate_python_rpm.bbclass | 59 ++++++++++++++++++++ meta/recipes-core/meta/external-python-tarball.bb | 61 ++++----------------- 4 files changed, 155 insertions(+), 50 deletions(-)Quoted 3 lines
create mode 100644 meta/classes/populate_python_deb.bbclass create mode 100644 meta/classes/populate_python_ipk.bbclass create mode 100644 meta/classes/populate_python_rpm.bbclass
Quoted 3 lines
No, sorry but this isn't right. We already have package specific functions to do these things, we should be trying to reuse those. If we can't reuse the functions, we need to improve them so we can.
OK, I'll try to use the existed function.
Thanks,
Kai
Quoted 6 lines
Cheers,
Richard