diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-10-29 23:24:19 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-10-29 23:24:19 +0000 |
commit | ae0e1ad29b6b2c67c37896d3a5f78219d3960ffd (patch) | |
tree | b0ce159bcfffa83410f161ee72924610a3be3541 | |
parent | 83a64003f85fe6e157bd0c38f5500b24fba9e392 (diff) | |
download | poky-ae0e1ad29b6b2c67c37896d3a5f78219d3960ffd.tar.gz |
package.bbclass: Cleanup getVar syntax to use True, not 1 as third argument
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | meta/classes/package.bbclass | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index df870142f1..523d7aeaee 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -30,12 +30,12 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
30 | """ | 30 | """ |
31 | import os, os.path, bb | 31 | import os, os.path, bb |
32 | 32 | ||
33 | dvar = bb.data.getVar('D', d, 1) | 33 | dvar = bb.data.getVar('D', d, True) |
34 | if not dvar: | 34 | if not dvar: |
35 | bb.error("D not defined") | 35 | bb.error("D not defined") |
36 | return | 36 | return |
37 | 37 | ||
38 | packages = bb.data.getVar('PACKAGES', d, 1).split() | 38 | packages = bb.data.getVar('PACKAGES', d, True).split() |
39 | 39 | ||
40 | if postinst: | 40 | if postinst: |
41 | postinst = '#!/bin/sh\n' + postinst + '\n' | 41 | postinst = '#!/bin/sh\n' + postinst + '\n' |
@@ -81,7 +81,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
81 | packages = [pkg] + packages | 81 | packages = [pkg] + packages |
82 | else: | 82 | else: |
83 | packages.append(pkg) | 83 | packages.append(pkg) |
84 | oldfiles = bb.data.getVar('FILES_' + pkg, d, 1) | 84 | oldfiles = bb.data.getVar('FILES_' + pkg, d, True) |
85 | if not oldfiles: | 85 | if not oldfiles: |
86 | the_files = [os.path.join(root, o)] | 86 | the_files = [os.path.join(root, o)] |
87 | if aux_files_pattern: | 87 | if aux_files_pattern: |
@@ -98,7 +98,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst | |||
98 | the_files.append(aux_files_pattern_verbatim % m.group(1)) | 98 | the_files.append(aux_files_pattern_verbatim % m.group(1)) |
99 | bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) | 99 | bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) |
100 | if extra_depends != '': | 100 | if extra_depends != '': |
101 | the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1) | 101 | the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, True) |
102 | if the_depends: | 102 | if the_depends: |
103 | the_depends = '%s %s' % (the_depends, extra_depends) | 103 | the_depends = '%s %s' % (the_depends, extra_depends) |
104 | else: | 104 | else: |
@@ -139,7 +139,7 @@ def runstrip(file, d): | |||
139 | 139 | ||
140 | import bb, os, commands, stat | 140 | import bb, os, commands, stat |
141 | 141 | ||
142 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, 1) | 142 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) |
143 | 143 | ||
144 | ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file)) | 144 | ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file)) |
145 | 145 | ||
@@ -156,8 +156,8 @@ def runstrip(file, d): | |||
156 | bb.note("Already ran strip") | 156 | bb.note("Already ran strip") |
157 | return 0 | 157 | return 0 |
158 | 158 | ||
159 | strip = bb.data.getVar("STRIP", d, 1) | 159 | strip = bb.data.getVar("STRIP", d, True) |
160 | objcopy = bb.data.getVar("OBJCOPY", d, 1) | 160 | objcopy = bb.data.getVar("OBJCOPY", d, True) |
161 | 161 | ||
162 | newmode = None | 162 | newmode = None |
163 | if not os.access(file, os.W_OK): | 163 | if not os.access(file, os.W_OK): |
@@ -207,10 +207,10 @@ def get_package_mapping (pkg, d): | |||
207 | def runtime_mapping_rename (varname, d): | 207 | def runtime_mapping_rename (varname, d): |
208 | import bb, os | 208 | import bb, os |
209 | 209 | ||
210 | #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, 1))) | 210 | #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True))) |
211 | 211 | ||
212 | new_depends = [] | 212 | new_depends = [] |
213 | for depend in bb.utils.explode_deps(bb.data.getVar(varname, d, 1) or ""): | 213 | for depend in bb.utils.explode_deps(bb.data.getVar(varname, d, True) or ""): |
214 | # Have to be careful with any version component of the depend | 214 | # Have to be careful with any version component of the depend |
215 | split_depend = depend.split(' (') | 215 | split_depend = depend.split(' (') |
216 | new_depend = get_package_mapping(split_depend[0].strip(), d) | 216 | new_depend = get_package_mapping(split_depend[0].strip(), d) |
@@ -221,7 +221,7 @@ def runtime_mapping_rename (varname, d): | |||
221 | 221 | ||
222 | bb.data.setVar(varname, " ".join(new_depends) or None, d) | 222 | bb.data.setVar(varname, " ".join(new_depends) or None, d) |
223 | 223 | ||
224 | #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, 1))) | 224 | #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, True))) |
225 | 225 | ||
226 | # | 226 | # |
227 | # Package functions suitable for inclusion in PACKAGEFUNCS | 227 | # Package functions suitable for inclusion in PACKAGEFUNCS |
@@ -230,23 +230,23 @@ def runtime_mapping_rename (varname, d): | |||
230 | python package_do_split_locales() { | 230 | python package_do_split_locales() { |
231 | import os | 231 | import os |
232 | 232 | ||
233 | if (bb.data.getVar('PACKAGE_NO_LOCALE', d, 1) == '1'): | 233 | if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'): |
234 | bb.debug(1, "package requested not splitting locales") | 234 | bb.debug(1, "package requested not splitting locales") |
235 | return | 235 | return |
236 | 236 | ||
237 | packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() | 237 | packages = (bb.data.getVar('PACKAGES', d, True) or "").split() |
238 | 238 | ||
239 | datadir = bb.data.getVar('datadir', d, 1) | 239 | datadir = bb.data.getVar('datadir', d, True) |
240 | if not datadir: | 240 | if not datadir: |
241 | bb.note("datadir not defined") | 241 | bb.note("datadir not defined") |
242 | return | 242 | return |
243 | 243 | ||
244 | dvar = bb.data.getVar('D', d, 1) | 244 | dvar = bb.data.getVar('D', d, True) |
245 | if not dvar: | 245 | if not dvar: |
246 | bb.error("D not defined") | 246 | bb.error("D not defined") |
247 | return | 247 | return |
248 | 248 | ||
249 | pn = bb.data.getVar('PN', d, 1) | 249 | pn = bb.data.getVar('PN', d, True) |
250 | if not pn: | 250 | if not pn: |
251 | bb.error("PN not defined") | 251 | bb.error("PN not defined") |
252 | return | 252 | return |
@@ -287,7 +287,7 @@ python package_do_split_locales() { | |||
287 | # glibc-localedata-translit* won't install as a dependency | 287 | # glibc-localedata-translit* won't install as a dependency |
288 | # for some other package which breaks meta-toolchain | 288 | # for some other package which breaks meta-toolchain |
289 | # Probably breaks since virtual-locale- isn't provided anywhere | 289 | # Probably breaks since virtual-locale- isn't provided anywhere |
290 | #rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "").split() | 290 | #rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "").split() |
291 | #rdep.append('%s-locale*' % pn) | 291 | #rdep.append('%s-locale*' % pn) |
292 | #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d) | 292 | #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d) |
293 | } | 293 | } |
@@ -295,27 +295,27 @@ python package_do_split_locales() { | |||
295 | python populate_packages () { | 295 | python populate_packages () { |
296 | import glob, stat, errno, re | 296 | import glob, stat, errno, re |
297 | 297 | ||
298 | workdir = bb.data.getVar('WORKDIR', d, 1) | 298 | workdir = bb.data.getVar('WORKDIR', d, True) |
299 | if not workdir: | 299 | if not workdir: |
300 | bb.error("WORKDIR not defined, unable to package") | 300 | bb.error("WORKDIR not defined, unable to package") |
301 | return | 301 | return |
302 | 302 | ||
303 | import os # path manipulations | 303 | import os # path manipulations |
304 | outdir = bb.data.getVar('DEPLOY_DIR', d, 1) | 304 | outdir = bb.data.getVar('DEPLOY_DIR', d, True) |
305 | if not outdir: | 305 | if not outdir: |
306 | bb.error("DEPLOY_DIR not defined, unable to package") | 306 | bb.error("DEPLOY_DIR not defined, unable to package") |
307 | return | 307 | return |
308 | bb.mkdirhier(outdir) | 308 | bb.mkdirhier(outdir) |
309 | 309 | ||
310 | dvar = bb.data.getVar('D', d, 1) | 310 | dvar = bb.data.getVar('D', d, True) |
311 | if not dvar: | 311 | if not dvar: |
312 | bb.error("D not defined, unable to package") | 312 | bb.error("D not defined, unable to package") |
313 | return | 313 | return |
314 | bb.mkdirhier(dvar) | 314 | bb.mkdirhier(dvar) |
315 | 315 | ||
316 | packages = bb.data.getVar('PACKAGES', d, 1) | 316 | packages = bb.data.getVar('PACKAGES', d, True) |
317 | 317 | ||
318 | pn = bb.data.getVar('PN', d, 1) | 318 | pn = bb.data.getVar('PN', d, True) |
319 | if not pn: | 319 | if not pn: |
320 | bb.error("PN not defined") | 320 | bb.error("PN not defined") |
321 | return | 321 | return |
@@ -341,14 +341,14 @@ python populate_packages () { | |||
341 | else: | 341 | else: |
342 | package_list.append(pkg) | 342 | package_list.append(pkg) |
343 | 343 | ||
344 | if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'): | 344 | if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'): |
345 | for root, dirs, files in os.walk(dvar): | 345 | for root, dirs, files in os.walk(dvar): |
346 | for f in files: | 346 | for f in files: |
347 | file = os.path.join(root, f) | 347 | file = os.path.join(root, f) |
348 | if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): | 348 | if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): |
349 | runstrip(file, d) | 349 | runstrip(file, d) |
350 | 350 | ||
351 | pkgdest = bb.data.getVar('PKGDEST', d, 1) | 351 | pkgdest = bb.data.getVar('PKGDEST', d, True) |
352 | os.system('rm -rf %s' % pkgdest) | 352 | os.system('rm -rf %s' % pkgdest) |
353 | 353 | ||
354 | seen = [] | 354 | seen = [] |
@@ -359,13 +359,13 @@ python populate_packages () { | |||
359 | bb.mkdirhier(root) | 359 | bb.mkdirhier(root) |
360 | 360 | ||
361 | bb.data.setVar('PKG', pkg, localdata) | 361 | bb.data.setVar('PKG', pkg, localdata) |
362 | overrides = bb.data.getVar('OVERRIDES', localdata, 1) | 362 | overrides = bb.data.getVar('OVERRIDES', localdata, True) |
363 | if not overrides: | 363 | if not overrides: |
364 | raise bb.build.FuncFailed('OVERRIDES not defined') | 364 | raise bb.build.FuncFailed('OVERRIDES not defined') |
365 | bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) | 365 | bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) |
366 | bb.data.update_data(localdata) | 366 | bb.data.update_data(localdata) |
367 | 367 | ||
368 | filesvar = bb.data.getVar('FILES', localdata, 1) or "" | 368 | filesvar = bb.data.getVar('FILES', localdata, True) or "" |
369 | files = filesvar.split() | 369 | files = filesvar.split() |
370 | for file in files: | 370 | for file in files: |
371 | if os.path.isabs(file): | 371 | if os.path.isabs(file): |
@@ -414,7 +414,7 @@ python populate_packages () { | |||
414 | bb.build.exec_func("package_name_hook", d) | 414 | bb.build.exec_func("package_name_hook", d) |
415 | 415 | ||
416 | for pkg in package_list: | 416 | for pkg in package_list: |
417 | pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1) | 417 | pkgname = bb.data.getVar('PKG_%s' % pkg, d, True) |
418 | if pkgname is None: | 418 | if pkgname is None: |
419 | bb.data.setVar('PKG_%s' % pkg, pkg, d) | 419 | bb.data.setVar('PKG_%s' % pkg, pkg, d) |
420 | 420 | ||
@@ -440,7 +440,7 @@ python populate_packages () { | |||
440 | dangling_links[pkg].append(os.path.normpath(target)) | 440 | dangling_links[pkg].append(os.path.normpath(target)) |
441 | 441 | ||
442 | for pkg in package_list: | 442 | for pkg in package_list: |
443 | rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") | 443 | rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "") |
444 | for l in dangling_links[pkg]: | 444 | for l in dangling_links[pkg]: |
445 | found = False | 445 | found = False |
446 | bb.debug(1, "%s contains dangling link %s" % (pkg, l)) | 446 | bb.debug(1, "%s contains dangling link %s" % (pkg, l)) |
@@ -469,11 +469,11 @@ python emit_pkgdata() { | |||
469 | c = codecs.getencoder("string_escape") | 469 | c = codecs.getencoder("string_escape") |
470 | return c(str)[0] | 470 | return c(str)[0] |
471 | 471 | ||
472 | val = bb.data.getVar('%s_%s' % (var, pkg), d, 1) | 472 | val = bb.data.getVar('%s_%s' % (var, pkg), d, True) |
473 | if val: | 473 | if val: |
474 | f.write('%s_%s: %s\n' % (var, pkg, encode(val))) | 474 | f.write('%s_%s: %s\n' % (var, pkg, encode(val))) |
475 | return | 475 | return |
476 | val = bb.data.getVar('%s' % (var), d, 1) | 476 | val = bb.data.getVar('%s' % (var), d, True) |
477 | if val: | 477 | if val: |
478 | f.write('%s: %s\n' % (var, encode(val))) | 478 | f.write('%s: %s\n' % (var, encode(val))) |
479 | return | 479 | return |
@@ -491,7 +491,7 @@ python emit_pkgdata() { | |||
491 | f.close() | 491 | f.close() |
492 | package_stagefile(data_file, d) | 492 | package_stagefile(data_file, d) |
493 | 493 | ||
494 | workdir = bb.data.getVar('WORKDIR', d, 1) | 494 | workdir = bb.data.getVar('WORKDIR', d, True) |
495 | 495 | ||
496 | for pkg in packages.split(): | 496 | for pkg in packages.split(): |
497 | subdata_file = pkgdatadir + "/runtime/%s" % pkg | 497 | subdata_file = pkgdatadir + "/runtime/%s" % pkg |
@@ -519,9 +519,9 @@ python emit_pkgdata() { | |||
519 | #if pkgdatadir2: | 519 | #if pkgdatadir2: |
520 | # bb.copyfile(subdata_file, pkgdatadir2 + "/runtime/%s" % pkg) | 520 | # bb.copyfile(subdata_file, pkgdatadir2 + "/runtime/%s" % pkg) |
521 | 521 | ||
522 | allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, 1) | 522 | allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, True) |
523 | if not allow_empty: | 523 | if not allow_empty: |
524 | allow_empty = bb.data.getVar('ALLOW_EMPTY', d, 1) | 524 | allow_empty = bb.data.getVar('ALLOW_EMPTY', d, True) |
525 | root = "%s/install/%s" % (workdir, pkg) | 525 | root = "%s/install/%s" % (workdir, pkg) |
526 | os.chdir(root) | 526 | os.chdir(root) |
527 | g = glob('*') | 527 | g = glob('*') |
@@ -553,22 +553,22 @@ python package_do_shlibs() { | |||
553 | lib_re = re.compile("^.*\.so") | 553 | lib_re = re.compile("^.*\.so") |
554 | libdir_re = re.compile(".*/lib$") | 554 | libdir_re = re.compile(".*/lib$") |
555 | 555 | ||
556 | packages = bb.data.getVar('PACKAGES', d, 1) | 556 | packages = bb.data.getVar('PACKAGES', d, True) |
557 | targetos = bb.data.getVar('TARGET_OS', d, 1) | 557 | targetos = bb.data.getVar('TARGET_OS', d, True) |
558 | 558 | ||
559 | workdir = bb.data.getVar('WORKDIR', d, 1) | 559 | workdir = bb.data.getVar('WORKDIR', d, True) |
560 | if not workdir: | 560 | if not workdir: |
561 | bb.error("WORKDIR not defined") | 561 | bb.error("WORKDIR not defined") |
562 | return | 562 | return |
563 | 563 | ||
564 | ver = bb.data.getVar('PV', d, 1) | 564 | ver = bb.data.getVar('PV', d, True) |
565 | if not ver: | 565 | if not ver: |
566 | bb.error("PV not defined") | 566 | bb.error("PV not defined") |
567 | return | 567 | return |
568 | 568 | ||
569 | pkgdest = bb.data.getVar('PKGDEST', d, 1) | 569 | pkgdest = bb.data.getVar('PKGDEST', d, True) |
570 | 570 | ||
571 | shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1) | 571 | shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True) |
572 | bb.mkdirhier(shlibs_dir) | 572 | bb.mkdirhier(shlibs_dir) |
573 | 573 | ||
574 | pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) | 574 | pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) |
@@ -576,8 +576,8 @@ python package_do_shlibs() { | |||
576 | lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) | 576 | lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) |
577 | 577 | ||
578 | def linux_so(root, path, file): | 578 | def linux_so(root, path, file): |
579 | cmd = bb.data.getVar('OBJDUMP', d, 1) + " -p " + os.path.join(root, file) + " 2>/dev/null" | 579 | cmd = bb.data.getVar('OBJDUMP', d, True) + " -p " + os.path.join(root, file) + " 2>/dev/null" |
580 | cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, 1), cmd) | 580 | cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, True), cmd) |
581 | fd = os.popen(cmd) | 581 | fd = os.popen(cmd) |
582 | lines = fd.readlines() | 582 | lines = fd.readlines() |
583 | fd.close() | 583 | fd.close() |
@@ -619,7 +619,7 @@ python package_do_shlibs() { | |||
619 | if not combo in sonames: | 619 | if not combo in sonames: |
620 | sonames.append(combo) | 620 | sonames.append(combo) |
621 | if file.endswith('.dylib') or file.endswith('.so'): | 621 | if file.endswith('.dylib') or file.endswith('.so'): |
622 | lafile = fullpath.replace(os.path.join(pkgdest, pkg), bb.data.getVar('D', d, 1)) | 622 | lafile = fullpath.replace(os.path.join(pkgdest, pkg), bb.data.getVar('D', d, True)) |
623 | # Drop suffix | 623 | # Drop suffix |
624 | lafile = lafile.rsplit(".",1)[0] | 624 | lafile = lafile.rsplit(".",1)[0] |
625 | lapath = os.path.dirname(lafile) | 625 | lapath = os.path.dirname(lafile) |
@@ -654,7 +654,7 @@ python package_do_shlibs() { | |||
654 | needed[pkg].append(name) | 654 | needed[pkg].append(name) |
655 | #bb.note("Adding %s for %s" % (name, pkg)) | 655 | #bb.note("Adding %s for %s" % (name, pkg)) |
656 | needed = {} | 656 | needed = {} |
657 | private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1) | 657 | private_libs = bb.data.getVar('PRIVATE_LIBS', d, True) |
658 | for pkg in packages.split(): | 658 | for pkg in packages.split(): |
659 | needs_ldconfig = False | 659 | needs_ldconfig = False |
660 | bb.debug(2, "calculating shlib provides for %s" % pkg) | 660 | bb.debug(2, "calculating shlib provides for %s" % pkg) |
@@ -690,10 +690,10 @@ python package_do_shlibs() { | |||
690 | package_stagefile(shver_file, d) | 690 | package_stagefile(shver_file, d) |
691 | if needs_ldconfig: | 691 | if needs_ldconfig: |
692 | bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) | 692 | bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) |
693 | postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) | 693 | postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, True) or bb.data.getVar('pkg_postinst', d, True) |
694 | if not postinst: | 694 | if not postinst: |
695 | postinst = '#!/bin/sh\n' | 695 | postinst = '#!/bin/sh\n' |
696 | postinst += bb.data.getVar('ldconfig_postinst_fragment', d, 1) | 696 | postinst += bb.data.getVar('ldconfig_postinst_fragment', d, True) |
697 | bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) | 697 | bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) |
698 | 698 | ||
699 | if pstageactive == "1": | 699 | if pstageactive == "1": |
@@ -720,7 +720,7 @@ python package_do_shlibs() { | |||
720 | for l in lines: | 720 | for l in lines: |
721 | shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) | 721 | shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) |
722 | 722 | ||
723 | assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, 1) | 723 | assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, True) |
724 | if assumed_libs: | 724 | if assumed_libs: |
725 | for e in assumed_libs.split(): | 725 | for e in assumed_libs.split(): |
726 | l, dep_pkg = e.split(":") | 726 | l, dep_pkg = e.split(":") |
@@ -764,16 +764,16 @@ python package_do_shlibs() { | |||
764 | python package_do_pkgconfig () { | 764 | python package_do_pkgconfig () { |
765 | import re, os | 765 | import re, os |
766 | 766 | ||
767 | packages = bb.data.getVar('PACKAGES', d, 1) | 767 | packages = bb.data.getVar('PACKAGES', d, True) |
768 | 768 | ||
769 | workdir = bb.data.getVar('WORKDIR', d, 1) | 769 | workdir = bb.data.getVar('WORKDIR', d, True) |
770 | if not workdir: | 770 | if not workdir: |
771 | bb.error("WORKDIR not defined") | 771 | bb.error("WORKDIR not defined") |
772 | return | 772 | return |
773 | 773 | ||
774 | pkgdest = bb.data.getVar('PKGDEST', d, 1) | 774 | pkgdest = bb.data.getVar('PKGDEST', d, True) |
775 | 775 | ||
776 | shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1) | 776 | shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True) |
777 | bb.mkdirhier(shlibs_dir) | 777 | bb.mkdirhier(shlibs_dir) |
778 | 778 | ||
779 | pc_re = re.compile('(.*)\.pc$') | 779 | pc_re = re.compile('(.*)\.pc$') |
@@ -868,7 +868,7 @@ python package_do_pkgconfig () { | |||
868 | } | 868 | } |
869 | 869 | ||
870 | python read_shlibdeps () { | 870 | python read_shlibdeps () { |
871 | packages = bb.data.getVar('PACKAGES', d, 1).split() | 871 | packages = bb.data.getVar('PACKAGES', d, True).split() |
872 | for pkg in packages: | 872 | for pkg in packages: |
873 | rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") | 873 | rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") |
874 | for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": | 874 | for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": |
@@ -896,14 +896,14 @@ python package_depchains() { | |||
896 | package. | 896 | package. |
897 | """ | 897 | """ |
898 | 898 | ||
899 | packages = bb.data.getVar('PACKAGES', d, 1) | 899 | packages = bb.data.getVar('PACKAGES', d, True) |
900 | postfixes = (bb.data.getVar('DEPCHAIN_POST', d, 1) or '').split() | 900 | postfixes = (bb.data.getVar('DEPCHAIN_POST', d, True) or '').split() |
901 | prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split() | 901 | prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, True) or '').split() |
902 | 902 | ||
903 | def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): | 903 | def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): |
904 | 904 | ||
905 | #bb.note('depends for %s is %s' % (base, depends)) | 905 | #bb.note('depends for %s is %s' % (base, depends)) |
906 | rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") | 906 | rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "") |
907 | 907 | ||
908 | for depend in depends: | 908 | for depend in depends: |
909 | if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): | 909 | if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): |
@@ -924,7 +924,7 @@ python package_depchains() { | |||
924 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): | 924 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): |
925 | 925 | ||
926 | #bb.note('rdepends for %s is %s' % (base, rdepends)) | 926 | #bb.note('rdepends for %s is %s' % (base, rdepends)) |
927 | rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") | 927 | rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "") |
928 | 928 | ||
929 | for depend in rdepends: | 929 | for depend in rdepends: |
930 | if depend.find('virtual-locale-') != -1: | 930 | if depend.find('virtual-locale-') != -1: |
@@ -948,15 +948,15 @@ python package_depchains() { | |||
948 | list.append(dep) | 948 | list.append(dep) |
949 | 949 | ||
950 | depends = [] | 950 | depends = [] |
951 | for dep in bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""): | 951 | for dep in bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or ""): |
952 | add_dep(depends, dep) | 952 | add_dep(depends, dep) |
953 | 953 | ||
954 | rdepends = [] | 954 | rdepends = [] |
955 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): | 955 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, True) or ""): |
956 | add_dep(rdepends, dep) | 956 | add_dep(rdepends, dep) |
957 | 957 | ||
958 | for pkg in packages.split(): | 958 | for pkg in packages.split(): |
959 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""): | 959 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, True) or ""): |
960 | add_dep(rdepends, dep) | 960 | add_dep(rdepends, dep) |
961 | 961 | ||
962 | #bb.note('rdepends is %s' % rdepends) | 962 | #bb.note('rdepends is %s' % rdepends) |
@@ -989,7 +989,7 @@ python package_depchains() { | |||
989 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) | 989 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) |
990 | else: | 990 | else: |
991 | rdeps = [] | 991 | rdeps = [] |
992 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""): | 992 | for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + base, d, True) or bb.data.getVar('RDEPENDS', d, True) or ""): |
993 | add_dep(rdeps, dep) | 993 | add_dep(rdeps, dep) |
994 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) | 994 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) |
995 | } | 995 | } |
@@ -1004,12 +1004,12 @@ PACKAGEFUNCS ?= "package_do_split_locales \ | |||
1004 | emit_pkgdata" | 1004 | emit_pkgdata" |
1005 | 1005 | ||
1006 | python package_do_package () { | 1006 | python package_do_package () { |
1007 | packages = (bb.data.getVar('PACKAGES', d, 1) or "").split() | 1007 | packages = (bb.data.getVar('PACKAGES', d, True) or "").split() |
1008 | if len(packages) < 1: | 1008 | if len(packages) < 1: |
1009 | bb.debug(1, "No packages to build, skipping do_package") | 1009 | bb.debug(1, "No packages to build, skipping do_package") |
1010 | return | 1010 | return |
1011 | 1011 | ||
1012 | for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split(): | 1012 | for f in (bb.data.getVar('PACKAGEFUNCS', d, True) or '').split(): |
1013 | bb.build.exec_func(f, d) | 1013 | bb.build.exec_func(f, d) |
1014 | } | 1014 | } |
1015 | do_package[dirs] = "${D}" | 1015 | do_package[dirs] = "${D}" |