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>
This commit is contained in:
Richard Purdie 2013-08-24 17:01:20 +01:00
parent 3883187066
commit 93ec1e347c
6 changed files with 15 additions and 15 deletions

View File

@ -559,11 +559,11 @@ python do_archive_linux_yocto(){
do_kernel_checkout[postfuncs] += "do_archive_linux_yocto "
# remove tarball for sources, patches and logs after creating srpm.
python do_remove_tarlist(){
python do_delete_tarlist(){
work_dir = d.getVar('WORKDIR', True)
tarlist = os.path.join(work_dir, 'tar-package')
if os.path.exists(tarlist):
os.remove(tarlist)
}
do_remove_tarlist[deptask] = "do_archive_scripts_logs"
do_package_write_rpm[postfuncs] += "do_remove_tarlist "
do_delete_tarlist[deptask] = "do_archive_scripts_logs"
do_package_write_rpm[postfuncs] += "do_delete_tarlist "

View File

@ -335,7 +335,7 @@ fakeroot do_rootfs () {
fi
# remove unneeded packages/files from the final image
rootfs_remove_unneeded
rootfs_uninstall_unneeded
insert_feed_uris
@ -497,7 +497,7 @@ rootfs_install_complementary() {
fi
}
rootfs_remove_unneeded () {
rootfs_uninstall_unneeded () {
if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
if [ -z "$(delayed_postinsts)" ]; then
# All packages were successfully configured.
@ -506,7 +506,7 @@ rootfs_remove_unneeded () {
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then
remove_run_postinsts=true
fi
rootfs_remove_packages update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}
rootfs_uninstall_packages update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}
# Need to remove rc.d files for run-postinsts by hand since opkg won't
# call postrm scripts in offline root mode.

View File

@ -57,7 +57,7 @@ def can_use_autotools_base(cfgdata, d):
return True
def can_remove_FILESPATH(cfgdata, d):
def can_delete_FILESPATH(cfgdata, d):
expected = cfgdata.get("FILESPATH")
#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}"
expectedpaths = d.expand(expected)
@ -71,7 +71,7 @@ def can_remove_FILESPATH(cfgdata, d):
return False
return expected != unexpanded
def can_remove_FILESDIR(cfgdata, d):
def can_delete_FILESDIR(cfgdata, d):
expected = cfgdata.get("FILESDIR")
#expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}"
unexpanded = d.getVar("FILESDIR", 0)
@ -87,7 +87,7 @@ def can_remove_FILESDIR(cfgdata, d):
(expanded in filespath or
expanded == d.expand(expected))
def can_remove_others(p, cfgdata, d):
def can_delete_others(p, cfgdata, d):
for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
"SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
#for k in cfgdata:
@ -113,8 +113,8 @@ python do_recipe_sanity () {
p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True))
sanitychecks = [
(can_remove_FILESDIR, "candidate for removal of FILESDIR"),
(can_remove_FILESPATH, "candidate for removal of FILESPATH"),
(can_delete_FILESDIR, "candidate for removal of FILESDIR"),
(can_delete_FILESPATH, "candidate for removal of FILESPATH"),
#(can_use_autotools_base, "candidate for use of autotools_base"),
(incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
]
@ -124,7 +124,7 @@ python do_recipe_sanity () {
if func(cfgdata, d):
__note(msg, d)
can_remove_others(p, cfgdata, d)
can_delete_others(p, cfgdata, d)
var_renames_overwrite(cfgdata, d)
req_vars(cfgdata, d)
bad_runtime_vars(cfgdata, d)

View File

@ -125,7 +125,7 @@ rootfs_install_packages() {
sed -i -e "s/Status: install ok unpacked/Status: install ok installed/;" $INSTALL_ROOTFS_DEB/var/lib/dpkg/status
}
rootfs_remove_packages() {
rootfs_uninstall_packages() {
# for some reason, --root doesn't really work here... We use --admindir&--instdir instead.
${STAGING_BINDIR_NATIVE}/dpkg --admindir=${IMAGE_ROOTFS}/var/lib/dpkg --instdir=${IMAGE_ROOTFS} -r --force-depends $@
}

View File

@ -136,7 +136,7 @@ rootfs_install_packages() {
opkg-cl ${OPKG_ARGS} install `cat $1`
}
rootfs_remove_packages() {
rootfs_uninstall_packages() {
opkg-cl ${OPKG_ARGS} --force-depends remove $@
}

View File

@ -178,7 +178,7 @@ rootfs_install_packages() {
package_install_internal_rpm
}
rootfs_remove_packages() {
rootfs_uninstall_packages() {
rpm -e --nodeps --root=${IMAGE_ROOTFS} --dbpath=/var/lib/rpm\
--define='_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper'\
--define='_tmppath /install/tmp' $@