From 004adaed2b87b215217df433f1b91cd392762049 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sat, 22 Jan 2005 05:50:23 +0000 Subject: bin/bitbake: * check if a package's task is already complete _before_ calling the functions to try to build it. * don't bother trying to build a package's deps if the package has already been built. * cache the information about the 'perhaps you should define PREFERRED_PROVIDER_blah' messages so that the user only sees one for each provider. --- bin/bitbake | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'bin/bitbake') diff --git a/bin/bitbake b/bin/bitbake index 697783d29..7a7288887 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -94,13 +94,18 @@ def try_build(fn, virtual): bb.error("upwards chain is: %s" % (" -> ".join(__build_path))) return False - __building_list.append(fn) - the_data = make.pkgdata[fn] item = bb.data.getVar('PN', the_data, 1) + + if bb.build.stamp_is_current('do_%s' % make.options.cmd, the_data): + return True + + __building_list.append(fn) + pathstr = "%s (%s)" % (item, virtual) __build_path.append(pathstr) + depends_list = (bb.data.getVar('DEPENDS', the_data, 1) or "").split() if make.options.verbose: bb.note("current path: %s" % (" -> ".join(__build_path))) @@ -262,6 +267,7 @@ def showVersions(): print "%-30s %20s %20s" % (p, latest[0][0] + "-" + latest[0][1], prefstr) +__consider_msgs_cache = [] def buildPackage(item): fn = None @@ -418,11 +424,14 @@ def buildPackage(item): break if len(eligible) > 1 and discriminated == False: - providers_list = [] - for fn in eligible: - providers_list.append(bb.data.getVar('PN', make.pkgdata[fn], 1)) - bb.note("multiple providers are available (%s);" % ", ".join(providers_list)) - bb.note("consider defining PREFERRED_PROVIDER_%s" % item) + if item not in __consider_msgs_cache: + providers_list = [] + for fn in eligible: + providers_list.append(bb.data.getVar('PN', make.pkgdata[fn], 1)) + bb.note("multiple providers are available (%s);" % ", ".join(providers_list)) + bb.note("consider defining PREFERRED_PROVIDER_%s" % item) + __consider_msgs_cache.append(item) + # run through the list until we find one that we can build for fn in eligible: -- cgit 1.2.3-korg