summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass52
1 files changed, 26 insertions, 26 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2a78a8f54b..256cdc15de 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -151,7 +151,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
151 the_files.append(fp % m.group(1)) 151 the_files.append(fp % m.group(1))
152 else: 152 else:
153 the_files.append(aux_files_pattern_verbatim % m.group(1)) 153 the_files.append(aux_files_pattern_verbatim % m.group(1))
154 bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) 154 d.setVar('FILES_' + pkg, " ".join(the_files))
155 if extra_depends != '': 155 if extra_depends != '':
156 the_depends = d.getVar('RDEPENDS_' + pkg, True) 156 the_depends = d.getVar('RDEPENDS_' + pkg, True)
157 if the_depends: 157 if the_depends:
@@ -165,11 +165,11 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
165 if postrm: 165 if postrm:
166 d.setVar('pkg_postrm_' + pkg, postrm) 166 d.setVar('pkg_postrm_' + pkg, postrm)
167 else: 167 else:
168 bb.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d) 168 d.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o))
169 if callable(hook): 169 if callable(hook):
170 hook(f, pkg, file_regex, output_pattern, m.group(1)) 170 hook(f, pkg, file_regex, output_pattern, m.group(1))
171 171
172 bb.data.setVar('PACKAGES', ' '.join(packages), d) 172 d.setVar('PACKAGES', ' '.join(packages))
173 173
174PACKAGE_DEPENDS += "file-native" 174PACKAGE_DEPENDS += "file-native"
175 175
@@ -183,7 +183,7 @@ python () {
183 deps = (d.getVarFlag('do_package', 'deptask') or "").split() 183 deps = (d.getVarFlag('do_package', 'deptask') or "").split()
184 # shlibs requires any DEPENDS to have already packaged for the *.list files 184 # shlibs requires any DEPENDS to have already packaged for the *.list files
185 deps.append("do_package") 185 deps.append("do_package")
186 bb.data.setVarFlag('do_package', 'deptask', " ".join(deps), d) 186 d.setVarFlag('do_package', 'deptask', " ".join(deps))
187 elif not bb.data.inherits_class('image', d): 187 elif not bb.data.inherits_class('image', d):
188 d.setVar("PACKAGERDEPTASK", "") 188 d.setVar("PACKAGERDEPTASK", "")
189} 189}
@@ -202,7 +202,7 @@ def splitfile(file, debugfile, debugsrcdir, d):
202 pathprefix = "export PATH=%s; " % d.getVar('PATH', True) 202 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
203 objcopy = d.getVar("OBJCOPY", True) 203 objcopy = d.getVar("OBJCOPY", True)
204 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 204 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
205 workdir = bb.data.expand("${WORKDIR}", d) 205 workdir = d.getVar("WORKDIR", True)
206 workparentdir = os.path.dirname(workdir) 206 workparentdir = os.path.dirname(workdir)
207 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 207 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
208 208
@@ -245,7 +245,7 @@ def splitfile2(debugsrcdir, d):
245 strip = d.getVar("STRIP", True) 245 strip = d.getVar("STRIP", True)
246 objcopy = d.getVar("OBJCOPY", True) 246 objcopy = d.getVar("OBJCOPY", True)
247 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 247 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
248 workdir = bb.data.expand("${WORKDIR}", d) 248 workdir = d.getVar("WORKDIR", True)
249 workparentdir = os.path.dirname(workdir) 249 workparentdir = os.path.dirname(workdir)
250 workbasedir = os.path.basename(workdir) 250 workbasedir = os.path.basename(workdir)
251 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 251 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
@@ -341,7 +341,7 @@ def runtime_mapping_rename (varname, d):
341 else: 341 else:
342 new_depends.append(new_depend) 342 new_depends.append(new_depend)
343 343
344 bb.data.setVar(varname, " ".join(new_depends) or None, d) 344 d.setVar(varname, " ".join(new_depends) or None)
345 345
346 #bb.note("%s after: %s" % (varname, d.getVar(varname, True))) 346 #bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
347 347
@@ -399,15 +399,15 @@ python package_do_split_locales() {
399 ln = legitimize_package_name(l) 399 ln = legitimize_package_name(l)
400 pkg = pn + '-locale-' + ln 400 pkg = pn + '-locale-' + ln
401 packages.append(pkg) 401 packages.append(pkg)
402 bb.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d) 402 d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l))
403 bb.data.setVar('RDEPENDS_' + pkg, '%s virtual-locale-%s' % (mainpkg, ln), d) 403 d.setVar('RDEPENDS_' + pkg, '%s virtual-locale-%s' % (mainpkg, ln))
404 bb.data.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln), d) 404 d.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln))
405 bb.data.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l), d) 405 d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l))
406 bb.data.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l), d) 406 d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
407 if locale_section: 407 if locale_section:
408 d.setVar('SECTION_' + pkg, locale_section) 408 d.setVar('SECTION_' + pkg, locale_section)
409 409
410 bb.data.setVar('PACKAGES', ' '.join(packages), d) 410 d.setVar('PACKAGES', ' '.join(packages))
411 411
412 # Disabled by RP 18/06/07 412 # Disabled by RP 18/06/07
413 # Wildcards aren't supported in debian 413 # Wildcards aren't supported in debian
@@ -417,7 +417,7 @@ python package_do_split_locales() {
417 # Probably breaks since virtual-locale- isn't provided anywhere 417 # Probably breaks since virtual-locale- isn't provided anywhere
418 #rdep = (d.getVar('RDEPENDS_%s' % mainpkg, True) or d.getVar('RDEPENDS', True) or "").split() 418 #rdep = (d.getVar('RDEPENDS_%s' % mainpkg, True) or d.getVar('RDEPENDS', True) or "").split()
419 #rdep.append('%s-locale*' % pn) 419 #rdep.append('%s-locale*' % pn)
420 #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d) 420 #d.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep))
421} 421}
422 422
423python perform_packagecopy () { 423python perform_packagecopy () {
@@ -1018,7 +1018,7 @@ python populate_packages () {
1018 break 1018 break
1019 if found == False: 1019 if found == False:
1020 bb.note("%s contains dangling symlink to %s" % (pkg, l)) 1020 bb.note("%s contains dangling symlink to %s" % (pkg, l))
1021 bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d) 1021 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
1022} 1022}
1023populate_packages[dirs] = "${D}" 1023populate_packages[dirs] = "${D}"
1024 1024
@@ -1033,11 +1033,11 @@ python emit_pkgdata() {
1033 c = codecs.getencoder("string_escape") 1033 c = codecs.getencoder("string_escape")
1034 return c(str)[0] 1034 return c(str)[0]
1035 1035
1036 val = bb.data.getVar('%s_%s' % (var, pkg), d, True) 1036 val = d.getVar('%s_%s' % (var, pkg), True)
1037 if val: 1037 if val:
1038 f.write('%s_%s: %s\n' % (var, pkg, encode(val))) 1038 f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
1039 return 1039 return
1040 val = bb.data.getVar('%s' % (var), d, True) 1040 val = d.getVar('%s' % (var), True)
1041 if val: 1041 if val:
1042 f.write('%s: %s\n' % (var, encode(val))) 1042 f.write('%s: %s\n' % (var, encode(val)))
1043 return 1043 return
@@ -1159,12 +1159,12 @@ python package_do_filedeps() {
1159 if len(provides) > 0: 1159 if len(provides) > 0:
1160 provides_files.append(file) 1160 provides_files.append(file)
1161 key = "FILERPROVIDES_" + file + "_" + pkg 1161 key = "FILERPROVIDES_" + file + "_" + pkg
1162 bb.data.setVar(key, " ".join(provides), d) 1162 d.setVar(key, " ".join(provides))
1163 1163
1164 if len(requires) > 0: 1164 if len(requires) > 0:
1165 requires_files.append(file) 1165 requires_files.append(file)
1166 key = "FILERDEPENDS_" + file + "_" + pkg 1166 key = "FILERDEPENDS_" + file + "_" + pkg
1167 bb.data.setVar(key, " ".join(requires), d) 1167 d.setVar(key, " ".join(requires))
1168 1168
1169 # Determine dependencies 1169 # Determine dependencies
1170 for pkg in packages.split(): 1170 for pkg in packages.split():
@@ -1181,8 +1181,8 @@ python package_do_filedeps() {
1181 1181
1182 process_deps(dep_pipe, pkg, f, provides_files, requires_files) 1182 process_deps(dep_pipe, pkg, f, provides_files, requires_files)
1183 1183
1184 bb.data.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files), d) 1184 d.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files))
1185 bb.data.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files), d) 1185 d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files))
1186} 1186}
1187 1187
1188SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs" 1188SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
@@ -1461,7 +1461,7 @@ python package_do_pkgconfig () {
1461 if m: 1461 if m:
1462 name = m.group(1) 1462 name = m.group(1)
1463 val = m.group(2) 1463 val = m.group(2)
1464 bb.data.setVar(name, bb.data.expand(val, pd), pd) 1464 pd.setVar(name, bb.data.expand(val, pd))
1465 continue 1465 continue
1466 m = field_re.match(l) 1466 m = field_re.match(l)
1467 if m: 1467 if m:
@@ -1519,7 +1519,7 @@ python package_do_pkgconfig () {
1519python read_shlibdeps () { 1519python read_shlibdeps () {
1520 packages = d.getVar('PACKAGES', True).split() 1520 packages = d.getVar('PACKAGES', True).split()
1521 for pkg in packages: 1521 for pkg in packages:
1522 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, 0) or d.getVar('RDEPENDS', 0) or "") 1522 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
1523 1523
1524 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": 1524 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
1525 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d) 1525 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
@@ -1529,7 +1529,7 @@ python read_shlibdeps () {
1529 fd.close() 1529 fd.close()
1530 for l in lines: 1530 for l in lines:
1531 rdepends[l.rstrip()] = "" 1531 rdepends[l.rstrip()] = ""
1532 bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d) 1532 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
1533} 1533}
1534 1534
1535python package_depchains() { 1535python package_depchains() {
@@ -1569,7 +1569,7 @@ python package_depchains() {
1569 rreclist[pkgname] = "" 1569 rreclist[pkgname] = ""
1570 1570
1571 #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist))) 1571 #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
1572 bb.data.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False), d) 1572 d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
1573 1573
1574 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): 1574 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
1575 1575
@@ -1590,7 +1590,7 @@ python package_depchains() {
1590 rreclist[pkgname] = "" 1590 rreclist[pkgname] = ""
1591 1591
1592 #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist))) 1592 #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
1593 bb.data.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False), d) 1593 d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
1594 1594
1595 def add_dep(list, dep): 1595 def add_dep(list, dep):
1596 dep = dep.split(' (')[0].strip() 1596 dep = dep.split(' (')[0].strip()