diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 22:10:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-17 22:32:03 +0000 |
commit | 069a332d1cf0778831673ed4ab5dfadbe2758783 (patch) | |
tree | cac103c685297423bdc5f67f8af9ac8dd64cc699 /meta/classes | |
parent | 68ceb02e98c977dd3eadea2c38b5eb796d6b6db4 (diff) | |
download | poky-069a332d1cf0778831673ed4ab5dfadbe2758783.tar.gz |
classes: Drop none package specific packaging variable accesses
(From OE-Core rev: 24cbe88429ba021d7c461e0271b67106d11d5eb2)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/gconf.bbclass | 9 | ||||
-rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/gtk-immodules-cache.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/mime.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 19 | ||||
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 6 |
7 files changed, 23 insertions, 31 deletions
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass index cc01bcad2a..e9076b2779 100644 --- a/meta/classes/gconf.bbclass +++ b/meta/classes/gconf.bbclass | |||
@@ -56,18 +56,15 @@ python populate_packages_append () { | |||
56 | if schemas != []: | 56 | if schemas != []: |
57 | bb.note("adding gconf postinst and prerm scripts to %s" % pkg) | 57 | bb.note("adding gconf postinst and prerm scripts to %s" % pkg) |
58 | d.setVar('SCHEMA_FILES', " ".join(schemas)) | 58 | d.setVar('SCHEMA_FILES', " ".join(schemas)) |
59 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 59 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
60 | if not postinst: | 60 | if not postinst: |
61 | postinst = '#!/bin/sh\n' | 61 | postinst = '#!/bin/sh\n' |
62 | postinst += d.getVar('gconf_postinst', True) | 62 | postinst += d.getVar('gconf_postinst', True) |
63 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 63 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
64 | prerm = d.getVar('pkg_prerm_%s' % pkg, True) or d.getVar('pkg_prerm', True) | 64 | prerm = d.getVar('pkg_prerm_%s' % pkg, True) |
65 | if not prerm: | 65 | if not prerm: |
66 | prerm = '#!/bin/sh\n' | 66 | prerm = '#!/bin/sh\n' |
67 | prerm += d.getVar('gconf_prerm', True) | 67 | prerm += d.getVar('gconf_prerm', True) |
68 | d.setVar('pkg_prerm_%s' % pkg, prerm) | 68 | d.setVar('pkg_prerm_%s' % pkg, prerm) |
69 | rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or "" | 69 | d.appendVar("RDEPENDS_%s" % pkg, ' ' + d.getVar('MLPREFIX') + 'gconf') |
70 | rdepends += ' ' + d.getVar('MLPREFIX') + 'gconf' | ||
71 | d.setVar("RDEPENDS_%s" % pkg, rdepends) | ||
72 | |||
73 | } | 70 | } |
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index 2ca99acdf9..223a280338 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass | |||
@@ -51,13 +51,13 @@ python populate_packages_append () { | |||
51 | 51 | ||
52 | bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg) | 52 | bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg) |
53 | 53 | ||
54 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 54 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
55 | if not postinst: | 55 | if not postinst: |
56 | postinst = '#!/bin/sh\n' | 56 | postinst = '#!/bin/sh\n' |
57 | postinst += d.getVar('gtk_icon_cache_postinst', True) | 57 | postinst += d.getVar('gtk_icon_cache_postinst', True) |
58 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 58 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
59 | 59 | ||
60 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) | 60 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) |
61 | if not postrm: | 61 | if not postrm: |
62 | postrm = '#!/bin/sh\n' | 62 | postrm = '#!/bin/sh\n' |
63 | postrm += d.getVar('gtk_icon_cache_postrm', True) | 63 | postrm += d.getVar('gtk_icon_cache_postrm', True) |
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass index 6a5bc19d74..ed3069daaf 100644 --- a/meta/classes/gtk-immodules-cache.bbclass +++ b/meta/classes/gtk-immodules-cache.bbclass | |||
@@ -60,13 +60,13 @@ python populate_packages_append () { | |||
60 | for pkg in gtkimmodules_pkgs: | 60 | for pkg in gtkimmodules_pkgs: |
61 | bb.note("adding gtk-immodule-cache postinst and postrm scripts to %s" % pkg) | 61 | bb.note("adding gtk-immodule-cache postinst and postrm scripts to %s" % pkg) |
62 | 62 | ||
63 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 63 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
64 | if not postinst: | 64 | if not postinst: |
65 | postinst = '#!/bin/sh\n' | 65 | postinst = '#!/bin/sh\n' |
66 | postinst += d.getVar('gtk_immodule_cache_postinst', True) | 66 | postinst += d.getVar('gtk_immodule_cache_postinst', True) |
67 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 67 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
68 | 68 | ||
69 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) | 69 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) |
70 | if not postrm: | 70 | if not postrm: |
71 | postrm = '#!/bin/sh\n' | 71 | postrm = '#!/bin/sh\n' |
72 | postrm += d.getVar('gtk_immodule_cache_postrm', True) | 72 | postrm += d.getVar('gtk_immodule_cache_postrm', True) |
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass index b669418286..690610e49d 100644 --- a/meta/classes/mime.bbclass +++ b/meta/classes/mime.bbclass | |||
@@ -43,18 +43,16 @@ python populate_packages_append () { | |||
43 | mimes.append(f) | 43 | mimes.append(f) |
44 | if mimes: | 44 | if mimes: |
45 | bb.note("adding mime postinst and postrm scripts to %s" % pkg) | 45 | bb.note("adding mime postinst and postrm scripts to %s" % pkg) |
46 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 46 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
47 | if not postinst: | 47 | if not postinst: |
48 | postinst = '#!/bin/sh\n' | 48 | postinst = '#!/bin/sh\n' |
49 | postinst += d.getVar('mime_postinst', True) | 49 | postinst += d.getVar('mime_postinst', True) |
50 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 50 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
51 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) | 51 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) |
52 | if not postrm: | 52 | if not postrm: |
53 | postrm = '#!/bin/sh\n' | 53 | postrm = '#!/bin/sh\n' |
54 | postrm += d.getVar('mime_postrm', True) | 54 | postrm += d.getVar('mime_postrm', True) |
55 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 55 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
56 | bb.note("adding shared-mime-info-data dependency to %s" % pkg) | 56 | bb.note("adding shared-mime-info-data dependency to %s" % pkg) |
57 | rdepends = explode_deps(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "" ) | 57 | d.appendVar('RDEPENDS_' + pkg, " shared-mime-info-data") |
58 | rdepends.append("shared-mime-info-data") | ||
59 | d.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends)) | ||
60 | } | 58 | } |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index f95fdf7251..77b3b4a219 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -418,7 +418,7 @@ python package_do_split_locales() { | |||
418 | # glibc-localedata-translit* won't install as a dependency | 418 | # glibc-localedata-translit* won't install as a dependency |
419 | # for some other package which breaks meta-toolchain | 419 | # for some other package which breaks meta-toolchain |
420 | # Probably breaks since virtual-locale- isn't provided anywhere | 420 | # Probably breaks since virtual-locale- isn't provided anywhere |
421 | #rdep = (d.getVar('RDEPENDS_%s' % pn, True) or d.getVar('RDEPENDS', True) or "").split() | 421 | #rdep = (d.getVar('RDEPENDS_%s' % pn, True) or "").split() |
422 | #rdep.append('%s-locale*' % pn) | 422 | #rdep.append('%s-locale*' % pn) |
423 | #d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep)) | 423 | #d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep)) |
424 | } | 424 | } |
@@ -901,7 +901,7 @@ python populate_packages () { | |||
901 | root = os.path.join(pkgdest, pkg) | 901 | root = os.path.join(pkgdest, pkg) |
902 | bb.utils.mkdirhier(root) | 902 | bb.utils.mkdirhier(root) |
903 | 903 | ||
904 | filesvar = d.getVar('FILES_%s' % pkg, True) or d.getVar('FILES', True) or "" | 904 | filesvar = d.getVar('FILES_%s' % pkg, True) or "" |
905 | if "//" in filesvar: | 905 | if "//" in filesvar: |
906 | bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) | 906 | bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg) |
907 | filesvar.replace("//", "/") | 907 | filesvar.replace("//", "/") |
@@ -1023,7 +1023,7 @@ python package_fixsymlinks () { | |||
1023 | bb.note("%s contains dangling symlink to %s" % (pkg, l)) | 1023 | bb.note("%s contains dangling symlink to %s" % (pkg, l)) |
1024 | 1024 | ||
1025 | for pkg in newrdepends: | 1025 | for pkg in newrdepends: |
1026 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "") | 1026 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "") |
1027 | for p in newrdepends[pkg]: | 1027 | for p in newrdepends[pkg]: |
1028 | if p not in rdepends: | 1028 | if p not in rdepends: |
1029 | rdepends[p] = [] | 1029 | rdepends[p] = [] |
@@ -1408,7 +1408,7 @@ python package_do_shlibs() { | |||
1408 | fd.close() | 1408 | fd.close() |
1409 | if needs_ldconfig and use_ldconfig: | 1409 | if needs_ldconfig and use_ldconfig: |
1410 | bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) | 1410 | bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) |
1411 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 1411 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
1412 | if not postinst: | 1412 | if not postinst: |
1413 | postinst = '#!/bin/sh\n' | 1413 | postinst = '#!/bin/sh\n' |
1414 | postinst += d.getVar('ldconfig_postinst_fragment', True) | 1414 | postinst += d.getVar('ldconfig_postinst_fragment', True) |
@@ -1595,7 +1595,7 @@ python read_shlibdeps () { | |||
1595 | 1595 | ||
1596 | packages = d.getVar('PACKAGES', True).split() | 1596 | packages = d.getVar('PACKAGES', True).split() |
1597 | for pkg in packages: | 1597 | for pkg in packages: |
1598 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "") | 1598 | rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "") |
1599 | for dep in pkglibdeps[pkg]: | 1599 | for dep in pkglibdeps[pkg]: |
1600 | # Add the dep if it's not already there, or if no comparison is set | 1600 | # Add the dep if it's not already there, or if no comparison is set |
1601 | if dep not in rdepends: | 1601 | if dep not in rdepends: |
@@ -1627,7 +1627,7 @@ python package_depchains() { | |||
1627 | def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): | 1627 | def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): |
1628 | 1628 | ||
1629 | #bb.note('depends for %s is %s' % (base, depends)) | 1629 | #bb.note('depends for %s is %s' % (base, depends)) |
1630 | rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "") | 1630 | rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or "") |
1631 | 1631 | ||
1632 | for depend in depends: | 1632 | for depend in depends: |
1633 | if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): | 1633 | if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): |
@@ -1648,7 +1648,7 @@ python package_depchains() { | |||
1648 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): | 1648 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): |
1649 | 1649 | ||
1650 | #bb.note('rdepends for %s is %s' % (base, rdepends)) | 1650 | #bb.note('rdepends for %s is %s' % (base, rdepends)) |
1651 | rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "") | 1651 | rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg, True) or "") |
1652 | 1652 | ||
1653 | for depend in rdepends: | 1653 | for depend in rdepends: |
1654 | if depend.find('virtual-locale-') != -1: | 1654 | if depend.find('virtual-locale-') != -1: |
@@ -1675,9 +1675,6 @@ python package_depchains() { | |||
1675 | add_dep(depends, dep) | 1675 | add_dep(depends, dep) |
1676 | 1676 | ||
1677 | rdepends = [] | 1677 | rdepends = [] |
1678 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS', True) or ""): | ||
1679 | add_dep(rdepends, dep) | ||
1680 | |||
1681 | for pkg in packages.split(): | 1678 | for pkg in packages.split(): |
1682 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg, True) or ""): | 1679 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg, True) or ""): |
1683 | add_dep(rdepends, dep) | 1680 | add_dep(rdepends, dep) |
@@ -1727,7 +1724,7 @@ python package_depchains() { | |||
1727 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) | 1724 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) |
1728 | else: | 1725 | else: |
1729 | rdeps = [] | 1726 | rdeps = [] |
1730 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base, True) or d.getVar('RDEPENDS', True) or ""): | 1727 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base, True) or ""): |
1731 | add_dep(rdeps, dep) | 1728 | add_dep(rdeps, dep) |
1732 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) | 1729 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) |
1733 | } | 1730 | } |
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index 0cefc51576..f7ad4d434b 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass | |||
@@ -324,12 +324,12 @@ python populate_packages_updatealternatives () { | |||
324 | 324 | ||
325 | bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg) | 325 | bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg) |
326 | bb.note('%s' % alt_setup_links) | 326 | bb.note('%s' % alt_setup_links) |
327 | postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n' | 327 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n' |
328 | postinst += alt_setup_links | 328 | postinst += alt_setup_links |
329 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 329 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
330 | 330 | ||
331 | bb.note('%s' % alt_remove_links) | 331 | bb.note('%s' % alt_remove_links) |
332 | postrm = (d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)) or '#!/bin/sh\n' | 332 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or '#!/bin/sh\n' |
333 | postrm += alt_remove_links | 333 | postrm += alt_remove_links |
334 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 334 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
335 | } | 335 | } |
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 51ad8b1ae9..65bf022e49 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -57,19 +57,19 @@ python populate_packages_updatercd () { | |||
57 | execute on the target. Not doing so may cause update_rc.d postinst invoked | 57 | execute on the target. Not doing so may cause update_rc.d postinst invoked |
58 | twice to cause unwanted warnings. | 58 | twice to cause unwanted warnings. |
59 | """ | 59 | """ |
60 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) | 60 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) |
61 | if not postinst: | 61 | if not postinst: |
62 | postinst = '#!/bin/sh\n' | 62 | postinst = '#!/bin/sh\n' |
63 | postinst += d.getVar('updatercd_postinst', True) | 63 | postinst += d.getVar('updatercd_postinst', True) |
64 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 64 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
65 | 65 | ||
66 | prerm = d.getVar('pkg_prerm_%s' % pkg, True) or d.getVar('pkg_prerm', True) | 66 | prerm = d.getVar('pkg_prerm_%s' % pkg, True) |
67 | if not prerm: | 67 | if not prerm: |
68 | prerm = '#!/bin/sh\n' | 68 | prerm = '#!/bin/sh\n' |
69 | prerm += d.getVar('updatercd_prerm', True) | 69 | prerm += d.getVar('updatercd_prerm', True) |
70 | d.setVar('pkg_prerm_%s' % pkg, prerm) | 70 | d.setVar('pkg_prerm_%s' % pkg, prerm) |
71 | 71 | ||
72 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) | 72 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) |
73 | if not postrm: | 73 | if not postrm: |
74 | postrm = '#!/bin/sh\n' | 74 | postrm = '#!/bin/sh\n' |
75 | postrm += d.getVar('updatercd_postrm', True) | 75 | postrm += d.getVar('updatercd_postrm', True) |