diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-03-23 22:31:13 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-03-23 22:31:13 +0000 |
| commit | bb28692880e3a66abec03de4f9951eca1078a919 (patch) | |
| tree | 85562c6a8dde6cbc59564d4d134e6c4d58275d1b /openembedded | |
| parent | b3f42b759915ee078b192c43b37a86a219d15ebf (diff) | |
| download | poky-bb28692880e3a66abec03de4f9951eca1078a919.tar.gz | |
Sync class files with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@328 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded')
| -rw-r--r-- | openembedded/classes/base.bbclass | 8 | ||||
| -rw-r--r-- | openembedded/classes/kernel.bbclass | 20 | ||||
| -rw-r--r-- | openembedded/classes/package.bbclass | 8 | ||||
| -rw-r--r-- | openembedded/classes/tinderclient.bbclass | 31 |
4 files changed, 51 insertions, 16 deletions
diff --git a/openembedded/classes/base.bbclass b/openembedded/classes/base.bbclass index 9b87828594..21feaab6e6 100644 --- a/openembedded/classes/base.bbclass +++ b/openembedded/classes/base.bbclass | |||
| @@ -371,7 +371,11 @@ def oe_unpack_file(file, data, url = None): | |||
| 371 | elif file.endswith('.bz2'): | 371 | elif file.endswith('.bz2'): |
| 372 | cmd = 'bzip2 -dc %s > %s' % (file, efile) | 372 | cmd = 'bzip2 -dc %s > %s' % (file, efile) |
| 373 | elif file.endswith('.zip'): | 373 | elif file.endswith('.zip'): |
| 374 | cmd = 'unzip -q %s' % file | 374 | cmd = 'unzip -q' |
| 375 | (type, host, path, user, pswd, parm) = bb.decodeurl(url) | ||
| 376 | if 'dos' in parm: | ||
| 377 | cmd = '%s -a' % cmd | ||
| 378 | cmd = '%s %s' % (cmd, file) | ||
| 375 | elif os.path.isdir(file): | 379 | elif os.path.isdir(file): |
| 376 | filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1)) | 380 | filesdir = os.path.realpath(bb.data.getVar("FILESDIR", data, 1)) |
| 377 | destdir = "." | 381 | destdir = "." |
| @@ -449,7 +453,7 @@ python base_do_patch() { | |||
| 449 | if not "patch" in parm: | 453 | if not "patch" in parm: |
| 450 | continue | 454 | continue |
| 451 | 455 | ||
| 452 | bb.fetch.init([url], d) | 456 | bb.fetch.init([url],d) |
| 453 | url = bb.encodeurl((type, host, path, user, pswd, [])) | 457 | url = bb.encodeurl((type, host, path, user, pswd, [])) |
| 454 | local = os.path.join('/', bb.fetch.localpath(url, d)) | 458 | local = os.path.join('/', bb.fetch.localpath(url, d)) |
| 455 | 459 | ||
diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass index bbe047a2f1..471acd4a61 100644 --- a/openembedded/classes/kernel.bbclass +++ b/openembedded/classes/kernel.bbclass | |||
| @@ -150,7 +150,7 @@ kernel_do_install() { | |||
| 150 | else | 150 | else |
| 151 | oenote "no modules to install" | 151 | oenote "no modules to install" |
| 152 | fi | 152 | fi |
| 153 | 153 | ||
| 154 | install -d ${D}/${KERNEL_IMAGEDEST} | 154 | install -d ${D}/${KERNEL_IMAGEDEST} |
| 155 | install -d ${D}/boot | 155 | install -d ${D}/boot |
| 156 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} | 156 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} |
| @@ -391,9 +391,16 @@ python populate_packages_prepend () { | |||
| 391 | v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" | 391 | v = bb.data.getVar("PARALLEL_INSTALL_MODULES", d, 1) or "0" |
| 392 | if v == "1": | 392 | if v == "1": |
| 393 | kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) | 393 | kv = bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) |
| 394 | packages = bb.data.getVar("PACKAGES", d, 1) | 394 | packages = bb.data.getVar("PACKAGES", d, 1).split() |
| 395 | module_re = re.compile("^kernel-module-") | 395 | module_re = re.compile("^kernel-module-") |
| 396 | for p in packages.split(): | 396 | |
| 397 | newmetapkg = "kernel-modules-%s" % kv | ||
| 398 | bb.data.setVar('ALLOW_EMPTY_' + newmetapkg, "1", d) | ||
| 399 | bb.data.setVar('FILES_' + newmetapkg, "", d) | ||
| 400 | |||
| 401 | newmetapkg_rdepends = [] | ||
| 402 | |||
| 403 | for p in packages: | ||
| 397 | if not module_re.match(p): | 404 | if not module_re.match(p): |
| 398 | continue | 405 | continue |
| 399 | pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p | 406 | pkg = bb.data.getVar("PKG_%s" % p, d, 1) or p |
| @@ -405,4 +412,11 @@ python populate_packages_prepend () { | |||
| 405 | else: | 412 | else: |
| 406 | rprovides = pkg | 413 | rprovides = pkg |
| 407 | bb.data.setVar("RPROVIDES_%s" % p, rprovides, d) | 414 | bb.data.setVar("RPROVIDES_%s" % p, rprovides, d) |
| 415 | newmetapkg_rdepends.append(newpkg) | ||
| 416 | |||
| 417 | bb.data.setVar('RDEPENDS_' + newmetapkg, ' '.join(newmetapkg_rdepends), d) | ||
| 418 | bb.data.setVar('DESCRIPTION_' + newmetapkg, 'Kernel modules meta package', d) | ||
| 419 | packages.append(newmetapkg) | ||
| 420 | bb.data.setVar('PACKAGES', ' '.join(packages), d) | ||
| 421 | |||
| 408 | } | 422 | } |
diff --git a/openembedded/classes/package.bbclass b/openembedded/classes/package.bbclass index 71795e8bb6..fbeabb64b3 100644 --- a/openembedded/classes/package.bbclass +++ b/openembedded/classes/package.bbclass | |||
| @@ -68,7 +68,7 @@ python package_mapping_rename_hook () { | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | 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): | 71 | 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): |
| 72 | import os, os.path, bb | 72 | import os, os.path, bb |
| 73 | 73 | ||
| 74 | dvar = bb.data.getVar('D', d, 1) | 74 | dvar = bb.data.getVar('D', d, 1) |
| @@ -125,6 +125,12 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
| 125 | the_files.append(fp % on) | 125 | the_files.append(fp % on) |
| 126 | else: | 126 | else: |
| 127 | the_files.append(aux_files_pattern % on) | 127 | the_files.append(aux_files_pattern % on) |
| 128 | if aux_files_pattern_verbatim: | ||
| 129 | if type(aux_files_pattern_verbatim) is list: | ||
| 130 | for fp in aux_files_pattern_verbatim: | ||
| 131 | the_files.append(fp % m.group(1)) | ||
| 132 | else: | ||
| 133 | the_files.append(aux_files_pattern_verbatim % m.group(1)) | ||
| 128 | bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) | 134 | bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) |
| 129 | if extra_depends != '': | 135 | if extra_depends != '': |
| 130 | the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1) | 136 | the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1) |
diff --git a/openembedded/classes/tinderclient.bbclass b/openembedded/classes/tinderclient.bbclass index 1c6a6c497f..f9243f7108 100644 --- a/openembedded/classes/tinderclient.bbclass +++ b/openembedded/classes/tinderclient.bbclass | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | def tinder_form_data(bound, dict, log): | 1 | def tinder_form_data(bound, dict, log): |
| 2 | """ | ||
| 3 | Create the boundary for the HTTP Post | ||
| 4 | """ | ||
| 5 | output = [] | 2 | output = [] |
| 6 | 3 | #br | |
| 7 | # for each key in the dictionary | 4 | # for each key in the dictionary |
| 8 | for name in dict: | 5 | for name in dict: |
| 9 | output.append( "--" + bound ) | 6 | output.append( "--" + bound ) |
| @@ -214,7 +211,7 @@ def tinder_print_env(): | |||
| 214 | 211 | ||
| 215 | return "\n".join(output) % vars() | 212 | return "\n".join(output) % vars() |
| 216 | 213 | ||
| 217 | def tinder_tinder_start(d): | 214 | def tinder_tinder_start(d, event): |
| 218 | """ | 215 | """ |
| 219 | PRINT the configuration of this build | 216 | PRINT the configuration of this build |
| 220 | """ | 217 | """ |
| @@ -223,13 +220,18 @@ def tinder_tinder_start(d): | |||
| 223 | config = tinder_print_info(d) | 220 | config = tinder_print_info(d) |
| 224 | #env = tinder_print_env() | 221 | #env = tinder_print_env() |
| 225 | time_end = tinder_time_string() | 222 | time_end = tinder_time_string() |
| 223 | packages = " ".join( event.getPkgs() ) | ||
| 226 | 224 | ||
| 227 | output = [] | 225 | output = [] |
| 228 | output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) | 226 | output.append( "---> TINDERBOX PRINTING CONFIGURATION %(time_start)s" ) |
| 229 | output.append( config ) | 227 | output.append( config ) |
| 230 | #output.append( env ) | 228 | #output.append( env ) |
| 231 | output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) | 229 | output.append( "<--- TINDERBOX FINISHED PRINTING CONFIGURATION %(time_end)s" ) |
| 232 | output.append( "" ) | 230 | output.append( "---> TINDERBOX BUILDING '%(packages)s'" ) |
| 231 | output.append( "<--- TINDERBOX STARTING BUILD NOW" ) | ||
| 232 | |||
| 233 | output.append( "" ) | ||
| 234 | |||
| 233 | return "\n".join(output) % vars() | 235 | return "\n".join(output) % vars() |
| 234 | 236 | ||
| 235 | def tinder_do_tinder_report(event): | 237 | def tinder_do_tinder_report(event): |
| @@ -252,11 +254,11 @@ def tinder_do_tinder_report(event): | |||
| 252 | name = getName(event) | 254 | name = getName(event) |
| 253 | log = "" | 255 | log = "" |
| 254 | status = 1 | 256 | status = 1 |
| 255 | 257 | #print asd | |
| 256 | # Check what we need to do Build* shows we start or are done | 258 | # Check what we need to do Build* shows we start or are done |
| 257 | if name == "BuildStarted": | 259 | if name == "BuildStarted": |
| 258 | tinder_build_start(event.data) | 260 | tinder_build_start(event.data) |
| 259 | log = tinder_tinder_start(event.data) | 261 | log = tinder_tinder_start(event.data,event) |
| 260 | 262 | ||
| 261 | try: | 263 | try: |
| 262 | # truncate the tinder log file | 264 | # truncate the tinder log file |
| @@ -290,8 +292,18 @@ def tinder_do_tinder_report(event): | |||
| 290 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) | 292 | log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % data.getVar('P', event.data, True) |
| 291 | status = 200 | 293 | status = 200 |
| 292 | elif name == "BuildCompleted": | 294 | elif name == "BuildCompleted": |
| 293 | log += "Build Completed\n" | 295 | log += "Build Completed\n" |
| 294 | status = 100 | 296 | status = 100 |
| 297 | elif name == "MultipleProviders": | ||
| 298 | log += "---> TINDERBOX Multiple Providers\n" | ||
| 299 | log += "multiple providers are available (%s);\n" % ", ".join(event.getCandidates()) | ||
| 300 | log += "consider defining PREFERRED_PROVIDER_%s\n" % event.getItem() | ||
| 301 | log += "is runtime: %d\n" % event.isRuntime() | ||
| 302 | log += "<--- TINDERBOX Multiple Providers\n" | ||
| 303 | elif name == "NoProvider": | ||
| 304 | log += "Error: No Provider for: %s\n" % event.getItem() | ||
| 305 | log += "Error:Was Runtime: %d\n" % event.isRuntime() | ||
| 306 | status = 200 | ||
| 295 | 307 | ||
| 296 | # now post the log | 308 | # now post the log |
| 297 | if len(log) == 0: | 309 | if len(log) == 0: |
| @@ -307,7 +319,6 @@ addhandler tinderclient_eventhandler | |||
| 307 | python tinderclient_eventhandler() { | 319 | python tinderclient_eventhandler() { |
| 308 | from bb import note, error, data | 320 | from bb import note, error, data |
| 309 | from bb.event import NotHandled | 321 | from bb.event import NotHandled |
| 310 | |||
| 311 | do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) | 322 | do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) |
| 312 | if do_tinder_report and do_tinder_report == "1": | 323 | if do_tinder_report and do_tinder_report == "1": |
| 313 | tinder_do_tinder_report(e) | 324 | tinder_do_tinder_report(e) |
