]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hook
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 May 2012 08:24:22 +0000 (09:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 May 2012 17:03:26 +0000 (18:03 +0100)
The usage of this function renaming and it being called using
bb.build.exec_func() causes needless indirection loops, confusing log
files and seems generally pointless.

This simplification makes the process much simpler and faster. I can't
come up with a good reason why the export_functions functionality is
needed for this function.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass
meta/classes/package_deb.bbclass
meta/classes/package_ipk.bbclass
meta/classes/package_rpm.bbclass

index 44e551f6dd5a8400304f5eacae8a8c1846b6b72d..3d0f406b8090e84af2c380e21151776f865cd7ac 100644 (file)
@@ -1788,7 +1788,7 @@ addtask package_write before do_build after do_package
 # Helper functions for the package writing classes
 #
 
-python package_mapping_rename_hook () {
+def mapping_rename_hook(d):
        """
        Rewrite variables to account for package renaming in things
        like debian.bbclass or manual PKG variable name changes
@@ -1799,6 +1799,4 @@ python package_mapping_rename_hook () {
        runtime_mapping_rename("RPROVIDES", d)
        runtime_mapping_rename("RREPLACES", d)
        runtime_mapping_rename("RCONFLICTS", d)
-}
 
-EXPORT_FUNCTIONS mapping_rename_hook
index dc0f96366af504dedc0195479c6795eb33d198bc..4096fa2b892069d76462ccfce2f6774bf2d6fbc5 100644 (file)
@@ -330,7 +330,7 @@ python do_package_deb () {
             raise bb.build.FuncFailed("Missing field for deb generation: %s" % value)
         # more fields
 
-        bb.build.exec_func("mapping_rename_hook", localdata)
+        mapping_rename_hook(localdata)
 
         rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "")
         for dep in rdepends:
index 0e4fea8d531af6f791441dc2124ddfd1fcd20c30..73ec0ee14e8a9e8b9b64928fd539c39c69f315ed 100644 (file)
@@ -367,7 +367,7 @@ python do_package_ipk () {
                        raise bb.build.FuncFailed("Missing field for ipk generation: %s" % value)
                # more fields
 
-               bb.build.exec_func("mapping_rename_hook", localdata)
+               mapping_rename_hook(localdata)
 
                rdepends = bb.utils.explode_dep_versions(localdata.getVar("RDEPENDS", True) or "")
                rrecommends = bb.utils.explode_dep_versions(localdata.getVar("RRECOMMENDS", True) or "")
index 623069e3775cba4436473b2b37ed6edd94b77816..2da7a8b85ce2b2791b0871e2204aba53b4567d47 100644 (file)
@@ -700,7 +700,7 @@ python write_specfile () {
                translate_vers('RCONFLICTS', localdata)
 
                # Map the dependencies into their final form
-               bb.build.exec_func("mapping_rename_hook", localdata)
+               mapping_rename_hook(localdata)
 
                splitrdepends    = strip_multilib(localdata.getVar('RDEPENDS', True), d) or ""
                splitrrecommends = strip_multilib(localdata.getVar('RRECOMMENDS', True), d) or ""