diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-24 17:01:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:29:45 +0100 |
commit | 93ec1e347cbba47cb35137047ac2ef8875a1c5d1 (patch) | |
tree | 4a677d414583daf49f8d029bea7a320bb3856751 | |
parent | 388318706699250b7f48c5692ba81f0595b176bd (diff) | |
download | poky-93ec1e347cbba47cb35137047ac2ef8875a1c5d1.tar.gz |
classes: Remove references to _remove in function names since this may become a bitbake keyword
There is a good chance we might want to support a bitbake operator
"_remove" which works in a similar way to _append and _prepend. As
such, we can't use those keywords in function or variable names.
(From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/archiver.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/image.bbclass | 6 | ||||
-rw-r--r-- | meta/classes/recipe_sanity.bbclass | 12 | ||||
-rw-r--r-- | meta/classes/rootfs_deb.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 3d75d8eba2..e42c419372 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -559,11 +559,11 @@ python do_archive_linux_yocto(){ | |||
559 | do_kernel_checkout[postfuncs] += "do_archive_linux_yocto " | 559 | do_kernel_checkout[postfuncs] += "do_archive_linux_yocto " |
560 | 560 | ||
561 | # remove tarball for sources, patches and logs after creating srpm. | 561 | # remove tarball for sources, patches and logs after creating srpm. |
562 | python do_remove_tarlist(){ | 562 | python do_delete_tarlist(){ |
563 | work_dir = d.getVar('WORKDIR', True) | 563 | work_dir = d.getVar('WORKDIR', True) |
564 | tarlist = os.path.join(work_dir, 'tar-package') | 564 | tarlist = os.path.join(work_dir, 'tar-package') |
565 | if os.path.exists(tarlist): | 565 | if os.path.exists(tarlist): |
566 | os.remove(tarlist) | 566 | os.remove(tarlist) |
567 | } | 567 | } |
568 | do_remove_tarlist[deptask] = "do_archive_scripts_logs" | 568 | do_delete_tarlist[deptask] = "do_archive_scripts_logs" |
569 | do_package_write_rpm[postfuncs] += "do_remove_tarlist " | 569 | do_package_write_rpm[postfuncs] += "do_delete_tarlist " |
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 909702ac23..ea59c36441 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -335,7 +335,7 @@ fakeroot do_rootfs () { | |||
335 | fi | 335 | fi |
336 | 336 | ||
337 | # remove unneeded packages/files from the final image | 337 | # remove unneeded packages/files from the final image |
338 | rootfs_remove_unneeded | 338 | rootfs_uninstall_unneeded |
339 | 339 | ||
340 | insert_feed_uris | 340 | insert_feed_uris |
341 | 341 | ||
@@ -497,7 +497,7 @@ rootfs_install_complementary() { | |||
497 | fi | 497 | fi |
498 | } | 498 | } |
499 | 499 | ||
500 | rootfs_remove_unneeded () { | 500 | rootfs_uninstall_unneeded () { |
501 | if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then | 501 | if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then |
502 | if [ -z "$(delayed_postinsts)" ]; then | 502 | if [ -z "$(delayed_postinsts)" ]; then |
503 | # All packages were successfully configured. | 503 | # All packages were successfully configured. |
@@ -506,7 +506,7 @@ rootfs_remove_unneeded () { | |||
506 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then | 506 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then |
507 | remove_run_postinsts=true | 507 | remove_run_postinsts=true |
508 | fi | 508 | fi |
509 | rootfs_remove_packages update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} | 509 | rootfs_uninstall_packages update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL} |
510 | 510 | ||
511 | # Need to remove rc.d files for run-postinsts by hand since opkg won't | 511 | # Need to remove rc.d files for run-postinsts by hand since opkg won't |
512 | # call postrm scripts in offline root mode. | 512 | # call postrm scripts in offline root mode. |
diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass index 8b3a1c9571..2f90159d58 100644 --- a/meta/classes/recipe_sanity.bbclass +++ b/meta/classes/recipe_sanity.bbclass | |||
@@ -57,7 +57,7 @@ def can_use_autotools_base(cfgdata, d): | |||
57 | 57 | ||
58 | return True | 58 | return True |
59 | 59 | ||
60 | def can_remove_FILESPATH(cfgdata, d): | 60 | def can_delete_FILESPATH(cfgdata, d): |
61 | expected = cfgdata.get("FILESPATH") | 61 | expected = cfgdata.get("FILESPATH") |
62 | #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}" | 62 | #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}" |
63 | expectedpaths = d.expand(expected) | 63 | expectedpaths = d.expand(expected) |
@@ -71,7 +71,7 @@ def can_remove_FILESPATH(cfgdata, d): | |||
71 | return False | 71 | return False |
72 | return expected != unexpanded | 72 | return expected != unexpanded |
73 | 73 | ||
74 | def can_remove_FILESDIR(cfgdata, d): | 74 | def can_delete_FILESDIR(cfgdata, d): |
75 | expected = cfgdata.get("FILESDIR") | 75 | expected = cfgdata.get("FILESDIR") |
76 | #expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}" | 76 | #expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}" |
77 | unexpanded = d.getVar("FILESDIR", 0) | 77 | unexpanded = d.getVar("FILESDIR", 0) |
@@ -87,7 +87,7 @@ def can_remove_FILESDIR(cfgdata, d): | |||
87 | (expanded in filespath or | 87 | (expanded in filespath or |
88 | expanded == d.expand(expected)) | 88 | expanded == d.expand(expected)) |
89 | 89 | ||
90 | def can_remove_others(p, cfgdata, d): | 90 | def can_delete_others(p, cfgdata, d): |
91 | for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS", | 91 | for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS", |
92 | "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]: | 92 | "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]: |
93 | #for k in cfgdata: | 93 | #for k in cfgdata: |
@@ -113,8 +113,8 @@ python do_recipe_sanity () { | |||
113 | p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True)) | 113 | p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True)) |
114 | 114 | ||
115 | sanitychecks = [ | 115 | sanitychecks = [ |
116 | (can_remove_FILESDIR, "candidate for removal of FILESDIR"), | 116 | (can_delete_FILESDIR, "candidate for removal of FILESDIR"), |
117 | (can_remove_FILESPATH, "candidate for removal of FILESPATH"), | 117 | (can_delete_FILESPATH, "candidate for removal of FILESPATH"), |
118 | #(can_use_autotools_base, "candidate for use of autotools_base"), | 118 | #(can_use_autotools_base, "candidate for use of autotools_base"), |
119 | (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"), | 119 | (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"), |
120 | ] | 120 | ] |
@@ -124,7 +124,7 @@ python do_recipe_sanity () { | |||
124 | if func(cfgdata, d): | 124 | if func(cfgdata, d): |
125 | __note(msg, d) | 125 | __note(msg, d) |
126 | 126 | ||
127 | can_remove_others(p, cfgdata, d) | 127 | can_delete_others(p, cfgdata, d) |
128 | var_renames_overwrite(cfgdata, d) | 128 | var_renames_overwrite(cfgdata, d) |
129 | req_vars(cfgdata, d) | 129 | req_vars(cfgdata, d) |
130 | bad_runtime_vars(cfgdata, d) | 130 | bad_runtime_vars(cfgdata, d) |
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index dcfe78669c..0161f7a718 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass | |||
@@ -125,7 +125,7 @@ rootfs_install_packages() { | |||
125 | sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" $INSTALL_ROOTFS_DEB/var/lib/dpkg/status | 125 | sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" $INSTALL_ROOTFS_DEB/var/lib/dpkg/status |
126 | } | 126 | } |
127 | 127 | ||
128 | rootfs_remove_packages() { | 128 | rootfs_uninstall_packages() { |
129 | # for some reason, --root doesn't really work here... We use --admindir&--instdir instead. | 129 | # for some reason, --root doesn't really work here... We use --admindir&--instdir instead. |
130 | ${STAGING_BINDIR_NATIVE}/dpkg --admindir=${IMAGE_ROOTFS}/var/lib/dpkg --instdir=${IMAGE_ROOTFS} -r --force-depends $@ | 130 | ${STAGING_BINDIR_NATIVE}/dpkg --admindir=${IMAGE_ROOTFS}/var/lib/dpkg --instdir=${IMAGE_ROOTFS} -r --force-depends $@ |
131 | } | 131 | } |
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index c9650cb6c7..a37ab14df7 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -136,7 +136,7 @@ rootfs_install_packages() { | |||
136 | opkg-cl ${OPKG_ARGS} install `cat $1` | 136 | opkg-cl ${OPKG_ARGS} install `cat $1` |
137 | } | 137 | } |
138 | 138 | ||
139 | rootfs_remove_packages() { | 139 | rootfs_uninstall_packages() { |
140 | opkg-cl ${OPKG_ARGS} --force-depends remove $@ | 140 | opkg-cl ${OPKG_ARGS} --force-depends remove $@ |
141 | } | 141 | } |
142 | 142 | ||
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 30b52d4da2..6c68ac89fb 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
@@ -178,7 +178,7 @@ rootfs_install_packages() { | |||
178 | package_install_internal_rpm | 178 | package_install_internal_rpm |
179 | } | 179 | } |
180 | 180 | ||
181 | rootfs_remove_packages() { | 181 | rootfs_uninstall_packages() { |
182 | rpm -e --nodeps --root=${IMAGE_ROOTFS} --dbpath=/var/lib/rpm\ | 182 | rpm -e --nodeps --root=${IMAGE_ROOTFS} --dbpath=/var/lib/rpm\ |
183 | --define='_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper'\ | 183 | --define='_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper'\ |
184 | --define='_tmppath /install/tmp' $@ | 184 | --define='_tmppath /install/tmp' $@ |