From fca5491289bbdfe41ec9d96357b2f0e61b289804 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 5 Feb 2010 13:28:57 +0100 Subject: vala.bbclass: dont put config.vapi to staging * config.vapi is per-app and can be considered as part of the autotools stuff Signed-off-by: Martin Jansa --- classes/vala.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/vala.bbclass b/classes/vala.bbclass index 125820c00c..26339058c8 100644 --- a/classes/vala.bbclass +++ b/classes/vala.bbclass @@ -5,10 +5,12 @@ FILES_${PN}-dev += "\ ${datadir}/vala/vapi/*.deps \ " +VALA_DONT_STAGE_VAPIS ?= "\(/config.vapi$\)\|\(/config.deps$\)" + # .vapi and .deps files are arch independent and need to be present in the # staging datadir for the native vala compiler do_stage_append() { install -d ${STAGING_DATADIR_NATIVE}/vala/vapi - find . -name "*.vapi" -exec install -m 0644 {} ${STAGING_DATADIR_NATIVE}/vala/vapi/ \; - find . -name "*.deps" -exec install -m 0644 {} ${STAGING_DATADIR_NATIVE}/vala/vapi/ \; + for VALAFILE in `find . -name "*.vapi" | grep -v "$VALA_DONT_STAGE_VAPIS"`; do install -m 0644 ${VALAFILE} ${STAGING_DATADIR_NATIVE}/vala/vapi/; done + for VALAFILE in `find . -name "*.deps" | grep -v "$VALA_DONT_STAGE_VAPIS"`; do install -m 0644 ${VALAFILE} ${STAGING_DATADIR_NATIVE}/vala/vapi/; done } -- cgit v1.2.3 From 92b4e2562f70af5db556390431477c73e68a7857 Mon Sep 17 00:00:00 2001 From: Denis 'Gnutoo' Carikli Date: Fri, 12 Feb 2010 13:51:26 +0100 Subject: autotools.bbclass: fix issue with native and sed STAGING_DIR_HOST is "" when using native bbclass: native.bbclass:STAGING_DIR_HOST = "" But in autotools.bbclass there is: sed -i -e s:${STAGING_DIR_HOST}::g $i which result in the following code in run.autotools_prepackage_lamangler sed -i -e s:::g $i which makes libxml2-native fail like this: | sed: -e expression #1, char 0: no previous regular expression I discussed it on IRC: Feb 11 17:41:29 GNUtoo: We should only be doing that is STAGING_DIR_HOST isn't empty I guess So I made a temporary fix which only workarround,because some issues persist: Feb 11 17:41:02 RP: heh, I wonder whether paths with colons in would be considered valid :-} Signed-off-by: Denis 'Gnutoo' Carikli --- classes/autotools.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 1ea4b6f1d0..c53583b8b6 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -152,7 +152,9 @@ autotools_prepackage_lamangler () { sed -i -e s:${CROSS_DIR}/${HOST_SYS}::g $i sed -i -e s:${CROSS_DIR}::g $i sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i - sed -i -e s:${STAGING_DIR_HOST}::g $i + if [ -n "${STAGING_DIR_HOST}" ]; then + sed -i -e s:${STAGING_DIR_HOST}::g $i + fi sed -i -e s:${STAGING_DIR}::g $i sed -i -e s:${S}::g $i sed -i -e s:${T}::g $i -- cgit v1.2.3 From 45f82a941c77e9d747814fa1e337ba803475d327 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Sun, 14 Feb 2010 01:19:08 +0100 Subject: zaurus-kernels: move the kernel size check to linux-kexecboot.inc. * no need for DONT_CHECK_KERNELSIZE * clean up the affected files * check happens only if KERNEL_IMAGE_MAXSIZE is set --- classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 39ff928e6a..d4ecf72505 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -497,7 +497,7 @@ python populate_packages_prepend () { # Support checking the kernel size since some kernels need to reside in partitions # with a fixed length or there is a limit in transferring the kernel to memory do_sizecheck() { - if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" -a -z "${DONT_CHECK_KERNELSIZE}" ]; then + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then size=`ls -l ${KERNEL_OUTPUT} | awk '{ print $5}'` if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then rm ${KERNEL_OUTPUT} -- cgit v1.2.3 From feb019622e464739efe440ecabc2f9e5b5477682 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 15 Feb 2010 11:16:40 +0100 Subject: e*bbclass: run autopoint in configure * remove config.rpath stuff from recipes --- classes/e.bbclass | 8 ++++++-- classes/efl.bbclass | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index fca9aa0010..5db0749eef 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -10,12 +10,16 @@ ARM_INSTRUCTION_SET = "arm" inherit autotools pkgconfig binconfig do_prepsources () { - make clean distclean || true + make clean distclean || true } addtask prepsources after do_patch before do_configure +do_configure_prepend() { + autopoint || touch config.rpath +} + do_configure_append() { - find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g + find ${S} -name Makefile | xargs sed -i s:'-I$(includedir)':'-I.':g } export CURL_CONFIG = "${STAGING_BINDIR_CROSS}/curl-config" diff --git a/classes/efl.bbclass b/classes/efl.bbclass index 805422fdf4..14334571ce 100644 --- a/classes/efl.bbclass +++ b/classes/efl.bbclass @@ -17,7 +17,7 @@ inherit autotools AUTOTOOLS_STAGE_PKGCONFIG = "1" do_configure_prepend() { - touch config.rpath + autopoint || touch config.rpath } do_install_prepend () { -- cgit v1.2.3 From 5fa112f9839d06f15680b8749a07f070d1789795 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 9 Feb 2010 19:28:04 +0100 Subject: kernel.bbclass: prepare for 2.6.33 header move and simplify logic a bit --- classes/kernel.bbclass | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index d4ecf72505..3a52a067cc 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -127,16 +127,7 @@ kernel_do_stage() { mkdir -p ${STAGING_KERNEL_DIR}/include/asm-generic cp -fR include/asm-generic/* ${STAGING_KERNEL_DIR}/include/asm-generic/ - mkdir -p ${STAGING_KERNEL_DIR}/include/linux - cp -fR include/linux/* ${STAGING_KERNEL_DIR}/include/linux/ - - mkdir -p ${STAGING_KERNEL_DIR}/include/net - cp -fR include/net/* ${STAGING_KERNEL_DIR}/include/net/ - - mkdir -p ${STAGING_KERNEL_DIR}/include/pcmcia - cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/ - - for entry in drivers/crypto drivers/media include/media include/acpi include/sound include/video include/scsi include/trace; do + for entry in drivers/crypto drivers/media include/generated include/linux include/net include/pcmcia include/media include/acpi include/sound include/video include/scsi include/trace; do if [ -d $entry ]; then mkdir -p ${STAGING_KERNEL_DIR}/$entry cp -fR $entry/* ${STAGING_KERNEL_DIR}/$entry/ -- cgit v1.2.3 From bd711cfab09394b6f3064eaed24b8761edc19f19 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 19 Feb 2010 11:34:44 -0700 Subject: package.bbclass: when running 'file', be explicit about the path to the magic This works around one relocation issue. Signed-off-by: Tom Rini Signed-off-by: Chris Larson --- classes/package.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 062f782129..72c9053cc4 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -155,11 +155,12 @@ def runstrip(file, d): import commands, stat pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) + magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) - ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file)) + ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file)) if ret: - bb.error("runstrip: 'file %s' failed (forced strip)" % file) + bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file)) if "not stripped" not in result: bb.debug(1, "runstrip: skip %s" % file) -- cgit v1.2.3 From 40eae518118907dbbf8096a1eb646511ec27bc6f Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 19 Feb 2010 12:12:25 -0700 Subject: Revert "package.bbclass: when running 'file', be explicit about the path to the magic" Forgot to check a git status / log before pushing :) This reverts commit bd711cfab09394b6f3064eaed24b8761edc19f19. --- classes/package.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 72c9053cc4..062f782129 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -155,12 +155,11 @@ def runstrip(file, d): import commands, stat pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) - magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) - ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file)) + ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file)) if ret: - bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file)) + bb.error("runstrip: 'file %s' failed (forced strip)" % file) if "not stripped" not in result: bb.debug(1, "runstrip: skip %s" % file) -- cgit v1.2.3 From 54373795ff637421f9376def1e7e8d1a27324e30 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Mon, 22 Feb 2010 18:04:24 -0700 Subject: insane: check for .debug as a path component, not part of the path string Signed-off-by: Chris Larson --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 804caf06ee..c2e8d9cf1d 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -279,7 +279,7 @@ def package_qa_check_dbg(path, name,d, elf): sane = True if not "-dbg" in name: - if '.debug' in path: + if '.debug' in path.split(os.path.sep): error_msg = "non debug package contains .debug directory: %s path %s" % \ (name, package_qa_clean_path(path,d)) sane = package_qa_handle_error(3, error_msg, name, path, d) -- cgit v1.2.3 From 046c7c5f1cdec5c92f6a365d8846ba33986277b6 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 24 Feb 2010 19:19:03 +0100 Subject: rootfs_ipk.bbclass: always specify tmp_dir in opkg-cl call with -t parameter * When option tmp_dir is used in opkg.conf installed on rootfs then it's used also in do_rootfs call and points to probably non-existent directory on buildhost like /var/lib/opkg/tmp. * The value of tmp_dir from rootfs is used even with another config file specified with -c parameter * Before this, it was using default value (/tmp) on buildhost, now it will use own "${IMAGE_ROOTFS}-tmp" and remove it after do_rootfs finish (usually already empty inside, cleaned by opkg itself) * Similar patch for testlab.bbclass will follow Signed-off-by: Martin Jansa --- classes/rootfs_ipk.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 16dd511fcb..38d6121529 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -7,7 +7,8 @@ do_rootfs[depends] += "opkg-native:do_populate_staging" -IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" +IPKG_TMP_DIR = "${IMAGE_ROOTFS}-tmp" +IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" PACKAGE_INSTALL_NO_DEPS ?= "0" @@ -31,6 +32,7 @@ fakeroot rootfs_ipk_do_rootfs () { package_generate_ipkg_conf mkdir -p ${T} + mkdir -p ${IPKG_TMP_DIR} mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg/ STATUS=${IMAGE_ROOTFS}${libdir}/opkg/status @@ -100,6 +102,7 @@ fakeroot rootfs_ipk_do_rootfs () { ${ROOTFS_POSTPROCESS_COMMAND} log_check rootfs + rm -rf ${IPKG_TMP_DIR} } rootfs_ipk_log_check() { -- cgit v1.2.3 From 13555b5d9620b78e6e4d8f88de551f79a90e76c6 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 24 Feb 2010 09:22:47 +0000 Subject: testlab.bbclass: use opkg.conf from staging, always specify tmp_dir in opkg-cl call with -t parameter * Use opkg.conf from staging in the same way as do_rootfs does * When option tmp_dir is used in opkg.conf installed on rootfs then it's used also in do_rootfs call and points to probably non-existent directory on buildhost like /var/lib/opkg/tmp. * The value of tmp_dir from rootfs is used even with another config file specified with -c parameter * Before this, it was using default value (/tmp) on buildhost, now it will use own "${IMAGE_ROOTFS}-tmp" and remove it after do_rootfs finish (usually already empty inside, cleaned by opkg itself) Signed-off-by: Martin Jansa Acked-by: Denys Dmytriyenko Acked-by: Koen Kooi --- classes/testlab.bbclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass index fc923c5112..e6c9c8e284 100644 --- a/classes/testlab.bbclass +++ b/classes/testlab.bbclass @@ -24,26 +24,31 @@ do_testlab() { if [ -e ${IMAGE_ROOTFS}/etc/opkg ] && [ "${ONLINE_PACKAGE_MANAGEMENT}" = "full" ] ; then + IPKG_TMP_DIR="${IMAGE_ROOTFS}-tmp" + IPKG_ARGS="-f ${STAGING_ETCDIR_NATIVE}/opkg.conf -o ${IMAGE_ROOTFS} -t ${IPKG_TMP_DIR}" + TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab" mkdir -p ${TESTLAB_DIR}/ + mkdir -p ${IPKG_TMP_DIR}/ ls -laR ${IMAGE_ROOTFS} > ${TESTLAB_DIR}/files-in-image.txt echo > ${TESTLAB_DIR}/installed-packages.txt echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot - for pkg in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do - opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | awk '/Package/ {printf $2"_"} /Version/ {printf $2"_"} /Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt + for pkg in $(opkg-cl ${IPKG_ARGS} list_installed | awk '{print $1}') ; do + opkg-cl ${IPKG_ARGS} info $pkg | awk '/Package/ {printf $2"_"} /Version/ {printf $2"_"} /Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt - for depends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do + for depends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Depends) ; do echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v Depends | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done - for recommends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do + for recommends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Recom) ; do echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done done echo "}" >> ${TESTLAB_DIR}/depends.dot + rm -rf ${IPKG_TMP_DIR} grep -v kernel_2 ${TESTLAB_DIR}/depends.dot | grep -v kernel_image > ${TESTLAB_DIR}/depends-nokernel.dot grep -v libc6 ${TESTLAB_DIR}/depends-nokernel.dot | grep -v libgcc > ${TESTLAB_DIR}/depends-nokernel-nolibc.dot -- cgit v1.2.3 From df32920678d15c86897b50b752b937210a01edea Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 15 Jan 2010 08:30:33 +0000 Subject: base.bbclass: use bb.utils.*_sum instead of calling md5/sha sum commands Patch courtesy the Poky project. Signed-off-by: Chris Larson Acked-by: Marcin Juszkiewicz Acked-by: Tom Rini --- classes/base.bbclass | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 990e75ee14..72e57300d8 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -76,23 +76,26 @@ def base_chk_file_vars(parser, localpath, params, data): raise Exception("The path does not exist '%s'" % localpath) if want_md5sum: - try: - md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath)) - md5data = (md5pipe.readline().split() or [ "" ])[0] - md5pipe.close() - except OSError, e: - raise Exception("Executing md5sum failed") + md5data = bb.utils.md5_file(localpath) + if want_md5sum != md5data: bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (want_md5sum, md5data)) raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (want_md5sum, md5data)) if want_sha256sum: - try: - shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath)) - sha256data = (shapipe.readline().split() or [ "" ])[0] - shapipe.close() - except OSError, e: - raise Exception("Executing shasum failed") + shadata = bb.utils.sha256_file(localpath) + + # sha256_file() can return None if we are running on Python 2.4 (hashlib is + # 2.5 onwards, sha in 2.4 is 160-bit only), so check for this and call the + # standalone shasum binary if required. + if shadata is None: + try: + shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath)) + shadata = (shapipe.readline().split() or [ "" ])[0] + shapipe.close() + except OSError: + raise Exception("Executing shasum failed, please build shasum-native") + if want_sha256sum != sha256data: bb.note("The SHA256Sums did not match. Wanted: '%s' and Got: '%s'" % (want_sha256sum, sha256data)) raise Exception("SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (want_sha256sum, sha256data)) -- cgit v1.2.3 From 96da6f4431503ab682ae690868fb5fcaa3a8947f Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Wed, 19 Aug 2009 17:24:32 +0000 Subject: cross.bbclass: keep TARGET_SYS & TARGET_PREFIX independent. Signed-off-by: Chris Larson Acked-by: Michael Smith Acked-by: Tom Rini --- classes/cross.bbclass | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'classes') diff --git a/classes/cross.bbclass b/classes/cross.bbclass index 1de157c0f5..9a3d39cb49 100644 --- a/classes/cross.bbclass +++ b/classes/cross.bbclass @@ -2,6 +2,11 @@ # no need for them to be a direct target of 'world' EXCLUDE_FROM_WORLD = "1" +# In order to keep TARGET_PREFIX decoupled from TARGET_SYS, let's force the +# binary names to match the former, rather than relying on autoconf's implicit +# prefixing based on the latter. +EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}" + # Save PACKAGE_ARCH before changing HOST_ARCH OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}" PACKAGE_ARCH = "${OLD_PACKAGE_ARCH}" -- cgit v1.2.3 From 22ee98e2fc4d58de61184332e41b9a44c949ed17 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 25 Feb 2010 13:11:28 -0700 Subject: Revert "base.bbclass: use bb.utils.*_sum instead of calling md5/sha sum commands" Back this out for the time being, things are exploding now. This reverts commit df32920678d15c86897b50b752b937210a01edea. --- classes/base.bbclass | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 72e57300d8..990e75ee14 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -76,26 +76,23 @@ def base_chk_file_vars(parser, localpath, params, data): raise Exception("The path does not exist '%s'" % localpath) if want_md5sum: - md5data = bb.utils.md5_file(localpath) - + try: + md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath)) + md5data = (md5pipe.readline().split() or [ "" ])[0] + md5pipe.close() + except OSError, e: + raise Exception("Executing md5sum failed") if want_md5sum != md5data: bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (want_md5sum, md5data)) raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (want_md5sum, md5data)) if want_sha256sum: - shadata = bb.utils.sha256_file(localpath) - - # sha256_file() can return None if we are running on Python 2.4 (hashlib is - # 2.5 onwards, sha in 2.4 is 160-bit only), so check for this and call the - # standalone shasum binary if required. - if shadata is None: - try: - shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath)) - shadata = (shapipe.readline().split() or [ "" ])[0] - shapipe.close() - except OSError: - raise Exception("Executing shasum failed, please build shasum-native") - + try: + shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath)) + sha256data = (shapipe.readline().split() or [ "" ])[0] + shapipe.close() + except OSError, e: + raise Exception("Executing shasum failed") if want_sha256sum != sha256data: bb.note("The SHA256Sums did not match. Wanted: '%s' and Got: '%s'" % (want_sha256sum, sha256data)) raise Exception("SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (want_sha256sum, sha256data)) -- cgit v1.2.3 From 6338989af8aed24ab9228c78e2f68a4e8290075c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 25 Feb 2010 20:27:09 +0000 Subject: nativesdk.bbclass: Fix various DEPENDS handling bugs and add to OVERRIDES (from poky) Signed-off-by: Richard Purdie --- classes/nativesdk.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass index 080adc5d77..75f5790121 100644 --- a/classes/nativesdk.bbclass +++ b/classes/nativesdk.bbclass @@ -51,9 +51,12 @@ FILES_${PN}-dbg += "${prefix}/.debug \ export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" +ORIG_DEPENDS := "${DEPENDS}" +DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}" + python __anonymous () { pn = bb.data.getVar("PN", d, True) - depends = bb.data.getVar("DEPENDS", d, True) + depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) deps = bb.utils.explode_deps(depends) newdeps = [] for dep in deps: @@ -65,7 +68,7 @@ python __anonymous () { newdeps.append(dep + "-nativesdk") else: newdeps.append(dep) - bb.data.setVar("DEPENDS", " ".join(newdeps), d) + bb.data.setVar("DEPENDS_virtclass-nativesdk", " ".join(newdeps), d) provides = bb.data.getVar("PROVIDES", d, True) for prov in provides.split(): if prov.find(pn) != -1: @@ -73,6 +76,7 @@ python __anonymous () { if not prov.endswith("-nativesdk"): provides = provides.replace(prov, prov + "-nativesdk") bb.data.setVar("PROVIDES", provides, d) + bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-nativesdk", d) } -- cgit v1.2.3 From 1b5e7041ae3b26b7e59c76bd2f2fd72e35492940 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 19 Feb 2010 08:47:48 +0000 Subject: package.bbclass: when running 'file', be explicit about the path to the magic This works around one relocation issue. Signed-off-by: Tom Rini Signed-off-by: Chris Larson --- classes/package.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 062f782129..72c9053cc4 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -155,11 +155,12 @@ def runstrip(file, d): import commands, stat pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) + magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) - ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file)) + ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file)) if ret: - bb.error("runstrip: 'file %s' failed (forced strip)" % file) + bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file)) if "not stripped" not in result: bb.debug(1, "runstrip: skip %s" % file) -- cgit v1.2.3