diff options
| author | Philip Balister <philip@balister.org> | 2006-10-28 13:48:12 +0000 |
|---|---|---|
| committer | Philip Balister <philip@balister.org> | 2006-10-28 13:48:12 +0000 |
| commit | a84ca6515375010be1cb18ec82ec48968b89bb84 (patch) | |
| tree | 1b430a4a6516a660fb9a4c5c6372fb101acd22bf /classes | |
| parent | 0332c860f096406ed143260218d9938b79173599 (diff) | |
| parent | 4c49cec0f00a58693f324b06363744dbcf856329 (diff) | |
merge of '9bb5aacf211c840ef28190458936fec0e3163a18'
and 'a89f7dd0fbeeb4f5627838591cb356337a0b5ae2'
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/base.bbclass | 4 | ||||
| -rw-r--r-- | classes/insane.bbclass | 35 | ||||
| -rw-r--r-- | classes/package.bbclass | 12 | ||||
| -rw-r--r-- | classes/test.bbclass | 2 | ||||
| -rw-r--r-- | classes/tinderclient.bbclass | 13 |
5 files changed, 59 insertions, 7 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index eda1b23b04..f4a0076f19 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -616,6 +616,10 @@ def explode_deps(s): r.append(i) return r +def packaged(pkg, d): + import os, bb + return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + def read_pkgdatafile(fn): pkgdata = {} diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 55f7721153..75602d0f44 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -17,6 +17,7 @@ # possible and this is contained within the pax-utils-native # + # We play a special package function inherit package PACKAGE_DEPENDS += "pax-utils-native" @@ -90,6 +91,38 @@ def package_qa_walk(path, funcs, package,d): func(path, package,d) +def package_qa_check_rdepends(pkg, workdir, d): + import bb + if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg: + # Copied from package_ipk.bbclass + # boiler plate to update the data + localdata = bb.data.createCopy(d) + root = "%s/install/%s" % (workdir, pkg) + + bb.data.setVar('ROOT', '', localdata) + bb.data.setVar('ROOT_%s' % pkg, root, localdata) + pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) + if not pkgname: + pkgname = pkg + bb.data.setVar('PKG', pkgname, localdata) + + overrides = bb.data.getVar('OVERRIDES', localdata) + if not overrides: + raise bb.build.FuncFailed('OVERRIDES not defined') + overrides = bb.data.expand(overrides, localdata) + bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) + + bb.data.update_data(localdata) + + # Now check the RDEPENDS + rdepends = explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "") + + + # Now do the sanity check!!! + for rdepend in rdepends: + if "-dbg" in rdepend: + bb.error("QA issue, koen give us a better msg!!!") + # The PACKAGE FUNC to scan each package python do_package_qa () { bb.note("DO PACKAGE QA") @@ -104,6 +137,8 @@ python do_package_qa () { bb.note("Package: %s" % package) path = "%s/install/%s" % (workdir, package) package_qa_walk(path, [package_qa_check_rpath, package_qa_check_devdbg, package_qa_check_perm, package_qa_check_arch], package, d) + package_qa_check_rdepends(package, workdir, d) + } diff --git a/classes/package.bbclass b/classes/package.bbclass index 652b60e226..4909fc61df 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -808,7 +808,7 @@ python package_depchains() { def pkg_addrrecs(pkg, base, func, d): rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") # bb.note('rdepends for %s is %s' % (base, rdepends)) - rreclist = [] + rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") for depend in rdepends: split_depend = depend.split(' (') @@ -824,8 +824,9 @@ python package_depchains() { for postfix in postfixes: def func(list, name): pkg = '%s%s' % (name, postfix) - if packaged(pkg, d): - list.append(pkg) + if not pkg in list: + if packaged(pkg, d): + list.append(pkg) base = pkg[:-len(postfix)] if pkg.endswith(postfix): @@ -835,8 +836,9 @@ python package_depchains() { for prefix in prefixes: def func(list, name): pkg = '%s%s' % (prefix, name) - if packaged(pkg, d): - list.append(pkg) + if not pkg in list: + if packaged(pkg, d): + list.append(pkg) base = pkg[len(prefix):] if pkg.startswith(prefix): diff --git a/classes/test.bbclass b/classes/test.bbclass index 71afe88404..ff3e945395 100644 --- a/classes/test.bbclass +++ b/classes/test.bbclass @@ -7,7 +7,7 @@ # -addtask test after do_compile +addtask test after do_compile before do_build test_do_test () { : } diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index d36ef0b343..3f5183cc8f 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -60,7 +60,18 @@ def tinder_format_http_post(d,status,log): "os" : os.uname()[0], "os_version" : os.uname()[2], "compiler" : "gcc", - "clobber" : data.getVar('TINDER_CLOBBER', d, True) + "clobber" : data.getVar('TINDER_CLOBBER', d, True), + "srcdate" : data.getVar('SRCDATE', d, True), + "PN" : data.getVar('PN', d, True), + "PV" : data.getVar('PV', d, True), + "PR" : data.getVar('PR', d, True), + "FILE" : data.getVar('FILE', d, True) or "N/A", + "TARGETARCH" : data.getVar('TARGET_ARCH', d, True), + "TARGETFPU" : data.getVar('TARGET_FPU', d, True) or "Unknown", + "TARGETOS" : data.getVar('TARGET_OS', d, True) or "Unknown", + "MACHINE" : data.getVar('MACHINE', d, True) or "Unknown", + "DISTRO" : data.getVar('DISTRO', d, True) or "Unknown", + "zecke-rocks" : "sure", } # optionally add the status |
