[oe-commits] org.oe.dev classes/base.bbclass: place shasum-native as the first package to build
freyther commit
openembedded-commits at lists.openembedded.org
Mon Apr 2 20:45:19 UTC 2007
classes/base.bbclass: place shasum-native as the first package to build
classes/base.bbclass: Make sure shasum-native does not depend on quilt
classes/sanity.bbclass: No need to require sha256sum as we use oe_sha256sum
packages/shasum: Change the name, make the -native version not have any deps
Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: 2a4ed2b247005e6fa3609f9d3c300ed0c933215d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=2a4ed2b247005e6fa3609f9d3c300ed0c933215d
Files:
1
classes/base.bbclass
classes/sanity.bbclass
packages/shasum/shasum-native.bb
packages/shasum/shasum.inc
Diffs:
#
# mt diff -ra36c2e4f725d1dcb9123c2f5d6f08cb2e4123413 -r2a4ed2b247005e6fa3609f9d3c300ed0c933215d
#
#
#
# patch "classes/base.bbclass"
# from [c00c5a0bc606c6209272cc163bc4334e0a694b53]
# to [a24e4e673608a40679457153103b591222ae0942]
#
# patch "classes/sanity.bbclass"
# from [5fcaa7e649d6a851bbd8d5d2b0a8c6105ba0f6fd]
# to [c273e975d186528dba7730969296a3b06485722e]
#
# patch "packages/shasum/shasum-native.bb"
# from [d41a9ac797ee0772e4f962d309296b3320038f93]
# to [de9917e801d649c084c228e14590b5459be5d95e]
#
# patch "packages/shasum/shasum.inc"
# from [edc10f7c9fe37ecdd5d238babe925f8ba3854e42]
# to [95d01d5ab80c081175980b41f167722ba3396381]
#
============================================================
--- classes/base.bbclass c00c5a0bc606c6209272cc163bc4334e0a694b53
+++ classes/base.bbclass a24e4e673608a40679457153103b591222ae0942
@@ -20,7 +20,7 @@ def base_chk_load_parser(config_path):
return parser
-def base_chk_file(parser, pn, pv, src_uri, localpath):
+def base_chk_file(parser, pn, pv, src_uri, localpath, data):
import os, bb
# Try PN-PV-SRC_URI first and then try PN-SRC_URI
# we rely on the get method to create errors
@@ -54,7 +54,7 @@ def base_chk_file(parser, pn, pv, src_ur
raise Exception("Executing md5sum failed")
try:
- shapipe = os.popen('sha256sum -b ' + localpath)
+ 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:
@@ -78,16 +78,22 @@ def base_dep_prepend(d):
# the case where host == build == target, for now we don't work in
# that case though.
#
- deps = ""
+ if bb.data.getVar('PN', d, True) == "shasum-native":
+ deps = ""
+ else:
+ deps = "shasum-native "
+ # INHIBIT_PATCH_TOOL don't apply the patch tool dependency
+ inhibit_patch = (bb.data.getVar("INHIBIT_PATCH_TOOL", d, True) == "1") or False
+
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
# the application.
patchdeps = bb.data.getVar("PATCHTOOL", d, 1)
- if patchdeps:
+ if patchdeps and not inhibit_patch:
patchdeps = "%s-native" % patchdeps
if not patchdeps in bb.data.getVar("PROVIDES", d, 1):
- deps = patchdeps
+ deps += patchdeps
if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
if (bb.data.getVar('HOST_SYS', d, 1) !=
@@ -439,6 +445,7 @@ do_fetch[dirs] = "${DL_DIR}"
addtask fetch
do_fetch[dirs] = "${DL_DIR}"
+do_fetch[depends] = "shasum-native:do_populate_staging"
python base_do_fetch() {
import sys
@@ -493,7 +500,7 @@ python base_do_fetch() {
(type,host,path,_,_,_) = bb.decodeurl(url)
uri = "%s://%s%s" % (type,host,path)
try:
- if not base_chk_file(parser, pn, pv,uri, localpath):
+ if not base_chk_file(parser, pn, pv,uri, localpath, d):
bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri))
except Exception:
raise bb.build.FuncFailed("Checksum of '%s' failed" % uri)
============================================================
--- classes/sanity.bbclass 5fcaa7e649d6a851bbd8d5d2b0a8c6105ba0f6fd
+++ classes/sanity.bbclass c273e975d186528dba7730969296a3b06485722e
@@ -86,7 +86,7 @@ def check_sanity(e):
if not check_app_exists('${BUILD_PREFIX}g++', e.data):
missing = missing + "C++ Compiler (${BUILD_PREFIX}g++),"
- required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk sha256sum md5sum"
+ required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum"
for util in required_utilities.split():
if not check_app_exists( util, e.data ):
============================================================
--- packages/shasum/shasum-native.bb d41a9ac797ee0772e4f962d309296b3320038f93
+++ packages/shasum/shasum-native.bb de9917e801d649c084c228e14590b5459be5d95e
@@ -1,7 +1,11 @@ inherit native
require shasum.inc
inherit native
+INHIBIT_DEFAULT_DEPS = "1"
+INHIBIT_PATCH_TOOL = "1"
+
+do_fetch[depends] = ""
do_populate_staging() {
- install ${S}/sha256sum ${STAGING_BINDIR}
+ install ${S}/oe_sha256sum ${STAGING_BINDIR}
}
============================================================
--- packages/shasum/shasum.inc edc10f7c9fe37ecdd5d238babe925f8ba3854e42
+++ packages/shasum/shasum.inc 95d01d5ab80c081175980b41f167722ba3396381
@@ -1,6 +1,8 @@ LICENSE = "LGPL"
SUMMARY = "A simple tool to create sha256 hashes from a file"
LICENSE = "LGPL"
+PR = "r1"
+
S = "${WORKDIR}"
@@ -14,5 +16,5 @@ do_compile() {
}
do_compile() {
- $CC $CFLAGS $CPPFLAGS -o sha256sum main.c sha256.c
+ $CC $CFLAGS $CPPFLAGS -o oe_sha256sum main.c sha256.c
}
More information about the Openembedded-commits
mailing list