From deb50c8b70a08632e779db9ee60d3f2d655fd3aa Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Wed, 29 Apr 2009 23:57:54 +0400 Subject: coreutils-native: make mandatory dep for all packages Gives us guaranteed sane GNU coreutils on any host. Should greatly ease support for various non-GNU host systems and allow to safely remove some other native packages like 'install-native'. Acked-by: Otavio Salvador --- classes/base.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index e5fd814b25..270b05d11e 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -125,9 +125,11 @@ def base_dep_prepend(d): # the case where host == build == target, for now we don't work in # that case though. # - deps = "shasum-native " - if bb.data.getVar('PN', d, True) == "shasum-native": + deps = "shasum-native coreutils-native" + if bb.data.getVar('PN', d, True) == "shasum-native" or bb.data.getVar('PN', d, True) == "stagemanager-native": deps = "" + if bb.data.getVar('PN', d, True) == "coreutils-native": + deps = "shasum-native" # 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 -- cgit v1.2.3 From 714bed6ab1174ec126ea7d8c8655d1cfd6900325 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 3 May 2009 19:23:57 -0400 Subject: base.bbclass: check_gcc3 needs to check for gcc-3.4.6 first. Comment on what this function is used for primarily. The default gcc3-native that we build is called 'gcc-3.4.6' so look for that one first. --- classes/base.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 270b05d11e..0baf0e0288 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1236,8 +1236,11 @@ def check_app_exists(app, d): return len(which(path, app)) != 0 def check_gcc3(data): + # Primarly used by qemu to make sure we have a workable gcc-3.4.x. + # Start by checking for the program name as we build it, was not + # all host-provided gcc-3.4's will work. - gcc3_versions = 'gcc-3.4 gcc34 gcc-3.4.4 gcc-3.4.6 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' + gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' for gcc3 in gcc3_versions.split(): if check_app_exists(gcc3, data): -- cgit v1.2.3 From 13f97da771882f6951c44346844e28c6bfd91d5d Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 4 May 2009 18:20:43 +0200 Subject: base.bbclass: added 'gcc-3.4' to list of gcc3 versions (Debian systems) --- classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 0baf0e0288..a901f02a6c 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -1240,7 +1240,7 @@ def check_gcc3(data): # Start by checking for the program name as we build it, was not # all host-provided gcc-3.4's will work. - gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' + gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32' for gcc3 in gcc3_versions.split(): if check_app_exists(gcc3, data): -- cgit v1.2.3 From c0622e65a95f42f921e24bfcbc90bce8c838903e Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 18 Mar 2009 09:20:31 -0700 Subject: First pass of cleanup of messages outputted to the user. OpenEmbedded outputs a lot of messages that the user is likely to never care about. We should only output something when it reflects upon their recipe (i.e. unpacking their sources, applying their patches), or is quite significant or unusual. Signed-off-by: Chris Larson --- classes/base.bbclass | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index a901f02a6c..3d4a426e75 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -896,22 +896,11 @@ python base_eventhandler() { from bb.event import Handled, NotHandled, getName import os - messages = {} - messages["Completed"] = "completed" - messages["Succeeded"] = "completed" - messages["Started"] = "started" - messages["Failed"] = "failed" - name = getName(e) - msg = "" - if name.startswith("Task"): - msg += "package %s: task %s: " % (data.getVar("PF", e.data, 1), e.task) - msg += messages.get(name[4:]) or name[4:] - elif name.startswith("Build"): - msg += "build %s: " % e.name - msg += messages.get(name[5:]) or name[5:] + if name == "TaskCompleted": + msg = "package %s: task %s is complete." % (data.getVar("PF", e.data, 1), e.task) elif name == "UnsatisfiedDep": - msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) + msg = "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) else: return NotHandled -- cgit v1.2.3 From 9699a955d48cb500b0b3dd691be68979c93bc72e Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 13 Mar 2009 13:42:06 -0700 Subject: Shorten some full paths printed to the user. Adds a base_path_out convenience function, which prepares a full path for display to the user. The initial implementation just makes it relative to ${TOPDIR}. This function is then used for some messages outputted to the user (packaged-staging, patch application, clean, unpack tasks). Signed-off-by: Chris Larson --- classes/base.bbclass | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 3d4a426e75..e622aeec51 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -39,6 +39,14 @@ def base_path_relative(src, dest): return sep.join(relpath) +def base_path_out(path, d): + """ Prepare a path for display to the user. """ + rel = base_path_relative(d.getVar("TOPDIR", 1), path) + if len(rel) > len(path): + return path + else: + return rel + # for MD5/SHA handling def base_chk_load_parser(config_paths): import ConfigParser, os, bb @@ -69,6 +77,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data): # md5 and sha256 should be valid now if not os.path.exists(localpath): + localpath = base_path_out(localpath, data) bb.note("The localpath does not exist '%s'" % localpath) raise Exception("The path does not exist '%s'" % localpath) @@ -497,11 +506,11 @@ python base_do_clean() { """clear the build and temp directories""" dir = bb.data.expand("${WORKDIR}", d) if dir == '//': raise bb.build.FuncFailed("wrong DATADIR") - bb.note("removing " + dir) + bb.note("removing " + base_path_out(dir, d)) os.system('rm -rf ' + dir) dir = "%s.*" % bb.data.expand(bb.data.getVar('STAMP', d), d) - bb.note("removing " + dir) + bb.note("removing " + base_path_out(dir, d)) os.system('rm -f '+ dir) } @@ -556,7 +565,7 @@ python base_do_distclean() { except bb.MalformedUrl, e: bb.debug(1, 'Unable to generate local path for malformed uri: %s' % e) else: - bb.note("removing %s" % local) + bb.note("removing %s" % base_path_out(local, d)) try: if os.path.exists(local + ".md5"): os.remove(local + ".md5") @@ -777,7 +786,7 @@ def oe_unpack_file(file, data, url = None): os.chdir(newdir) cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd) - bb.note("Unpacking %s to %s/" % (file, os.getcwd())) + bb.note("Unpacking %s to %s/" % (base_path_out(file, data), base_path_out(os.getcwd(), data))) ret = os.system(cmd) os.chdir(save_cwd) -- cgit v1.2.3