From bb28692880e3a66abec03de4f9951eca1078a919 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 23 Mar 2006 22:31:13 +0000 Subject: Sync class files with OE git-svn-id: https://svn.o-hand.com/repos/poky/trunk@328 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- openembedded/classes/base.bbclass | 8 ++++++-- openembedded/classes/kernel.bbclass | 20 +++++++++++++++++--- openembedded/classes/package.bbclass | 8 +++++++- openembedded/classes/tinderclient.bbclass | 31 +++++++++++++++++++++---------- 4 files changed, 51 insertions(+), 16 deletions(-) (limited to 'openembedded/classes') diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass index 9b8782859..21feaab6e 100644 --- a/openembedded/classes/base.bbclass +++ b/openembedded/classes/base.bbclass @@ -371,7 +371,11 @@ def oe_unpack_file(file, data, url = None): elif file.endswith('.bz2'): cmd = 'bzip2 -dc %s > %s' % (file, efile) elif file.endswith('.zip'): - cmd = 'unzip -q %s' % file + cmd = 'unzip -q' + (type, host, path, user, pswd, parm) = bb.decodeurl(url) + if 'dos' in parm: + cmd = '%s -a' % cmd + cmd = '%s %s' % (cmd, file) elif os.path.isdir(file): filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1)) destdir = "." @@ -449,7 +453,7 @@ python base_do_patch() { if not "patch" in parm: continue - bb.fetch.init([url], d) + bb.fetch.init([url],d) url = bb.encodeurl((type, host, path, user, pswd, [])) local = os.path.join('/', bb.fetch.localpath(url, d)) diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass index bbe047a2f..471acd4a6 100644 --- a/openembedded/classes/kernel.bbclass +++ b/openembedded/classes/kernel.bbclass @@ -150,7 +150,7 @@ kernel_do_install() { else oenote "no modules to install" fi - + install -d ${D}/${KERNEL_IMAGEDEST} install -d ${D}/boot install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} @@ -391,9 +391,16 @@ python populate_packages_prepend () { v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" if v == "1": kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) - packages = bb.data.getVar("PACKAGES", d, 1) + packages = bb.data.getVar("PACKAGES", d, 1).split() module_re = re.compile("^kernel-module-") - for p in packages.split(): + + newmetapkg = "kernel-modules-%s" % kv + bb.data.setVar('ALLOW_EMPTY_' + newmetapkg, "1", d) + bb.data.setVar('FILES_' + newmetapkg, "", d) + + newmetapkg_rdepends = [] + + for p in packages: if not module_re.match(p): continue pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p @@ -405,4 +412,11 @@ python populate_packages_prepend () { else: rprovides = pkg bb.data.setVar("RPROVIDES_%s" % p, rprovides, d) + newmetapkg_rdepends.append(newpkg) + + bb.data.setVar('RDEPENDS_' + newmetapkg, ' '.join(newmetapkg_rdepends), d) + bb.data.setVar('DESCRIPTION_' + newmetapkg, 'Kernel modules meta package', d) + packages.append(newmetapkg) + bb.data.setVar('PACKAGES', ' '.join(packages), d) + } diff --git a/openembedded/classes/package.bbclass b/openembedded/classes/package.bbclass index 71795e8bb..fbeabb64b 100644 --- a/openembedded/classes/package.bbclass +++ b/openembedded/classes/package.bbclass @@ -68,7 +68,7 @@ python package_mapping_rename_hook () { } -def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False): +def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None): import os, os.path, bb dvar = bb.data.getVar('D', d, 1) @@ -125,6 +125,12 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst the_files.append(fp % on) else: the_files.append(aux_files_pattern % on) + if aux_files_pattern_verbatim: + if type(aux_files_pattern_verbatim) is list: + for fp in aux_files_pattern_verbatim: + the_files.append(fp % m.group(1)) + else: + the_files.append(aux_files_pattern_verbatim % m.group(1)) bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) if extra_depends != '': the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1) diff --git a/openembedded/classes/tinderclient.bbclass b/openembedded/classes/tinderclient.bbclass index 1c6a6c497..f9243f710 100644 --- a/openembedded/classes/tinderclient.bbclass +++ b/openembedded/classes/tinderclient.bbclass @@ -1,9 +1,6 @@ def tinder_form_data(bound, dict, log): - """ - Create the boundary for the HTTP Post - """ output = [] - + #br # for each key in the dictionary for name in dict: output.append( "--" + bound ) @@ -214,7 +211,7 @@ def tinder_print_env(): return "\n".join(output) % vars() -def tinder_tinder_start(d): +def tinder_tinder_start(d, event): """ PRINT the configuration of this build """ @@ -223,13 +220,18 @@ def tinder_tinder_start(d): config = tinder_print_info(d) #env = tinder_print_env() time_end = tinder_time_string() + packages = " ".join( event.getPkgs() ) output = [] output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) output.append( config ) #output.append( env ) output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) - output.append( "" ) + output.append( "---> TINDERBOX BUILDING '%(packages)s'" ) + output.append( "<--- TINDERBOX STARTING BUILD NOW" ) + + output.append( "" ) + return "\n".join(output) % vars() def tinder_do_tinder_report(event): @@ -252,11 +254,11 @@ def tinder_do_tinder_report(event): name = getName(event) log = "" status = 1 - + #print asd # Check what we need to do Build* shows we start or are done if name == "BuildStarted": tinder_build_start(event.data) - log = tinder_tinder_start(event.data) + log = tinder_tinder_start(event.data,event) try: # truncate the tinder log file @@ -290,8 +292,18 @@ def tinder_do_tinder_report(event): log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) status = 200 elif name == "BuildCompleted": - log += "Build Completed\n" + log += "Build Completed\n" status = 100 + elif name == "MultipleProviders": + log += "---> TINDERBOX Multiple Providers\n" + log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates()) + log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem() + log += "is runtime: %d\n" % event.isRuntime() + log += "<--- TINDERBOX Multiple Providers\n" + elif name == "NoProvider": + log += "Error: No Provider for: %s\n" % event.getItem() + log += "Error:Was Runtime: %d\n" % event.isRuntime() + status = 200 # now post the log if len(log) == 0: @@ -307,7 +319,6 @@ addhandler tinderclient_eventhandler python tinderclient_eventhandler() { from bb import note, error, data from bb.event import NotHandled - do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) if do_tinder_report and do_tinder_report == "1": tinder_do_tinder_report(e) -- cgit v1.2.3