Patchwork package.bbclass: add a stub implementation of package_name_hook

login
register
mail settings
Submitter Ross Burton
Date July 1, 2014, 3:56 p.m.
Message ID <1404230213-3569-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/74525/
State Accepted
Commit 360171c8435242c6bfa87ca5b43a50737ae6d4d8
Headers show

Comments

Ross Burton - July 1, 2014, 3:56 p.m.
do_package() calls package_name_hook so that e.g. debian-style renaming through
debian.bbclass can happen.  If there is no class providing a package_name_hook
then this causes "WARNING: Function package_name_hook doesn't exist" every time
do_package() is executed.

Silence this warning by providing an empty package_name_hook in package.bbclass.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/package.bbclass |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ea75918..40b5069 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1119,6 +1119,18 @@  python package_fixsymlinks () {
         d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
 }
 
+
+python package_package_name_hook() {
+    """
+    A package_name_hook function can be used to rewrite the package names by
+    changing PKG.  For an example, see debian.bbclass.
+    """
+    pass
+}
+
+EXPORT_FUNCTIONS package_name_hook
+
+
 PKGDESTWORK = "${WORKDIR}/pkgdata"
 
 python emit_pkgdata() {