sanity.bbclass: allow dash to be used as /bin/sh, but print a warning
[vuplus_openembedded] / classes / debian.bbclass
index d66c1fc..0afe9fc 100644 (file)
@@ -1,3 +1,18 @@
+# Debian package renaming only occurs when a package is built
+# We therefore have to make sure we build all runtime packages
+# before building the current package to make the packages runtime
+# depends are correct
+#
+# Custom library package names can be defined setting
+# DEBIANNAME_ + pkgname to the desired name.
+#
+# Better expressed as ensure all RDEPENDS package before we package
+# This means we can't have circular RDEPENDS/RRECOMMENDS
+do_package_write_ipk[rdeptask] = "do_package"
+do_package_write_deb[rdeptask] = "do_package"
+do_package_write_tar[rdeptask] = "do_package"
+do_package_write_rpm[rdeptask] = "do_package"
+
 python debian_package_name_hook () {
        import glob, copy, stat, errno, re
 
@@ -74,9 +89,12 @@ python debian_package_name_hook () {
                        if soname_result:
                                (pkgname, devname) = soname_result
                                for pkg in packages.split():
-                                       if (bb.data.getVar('PKG_' + pkg, d)):
+                                       if (bb.data.getVar('PKG_' + pkg, d) or bb.data.getVar('DEBIAN_NOAUTONAME_' + pkg, d)):
                                                continue
-                                       if pkg == orig_pkg:
+                                       debian_pn = bb.data.getVar('DEBIANNAME_' + pkg, d)
+                                       if debian_pn:
+                                               newpkg = debian_pn
+                                       elif pkg == orig_pkg:
                                                newpkg = pkgname
                                        else:
                                                newpkg = pkg.replace(orig_pkg, devname, 1)
@@ -89,5 +107,5 @@ python debian_package_name_hook () {
 
 EXPORT_FUNCTIONS package_name_hook
 
-DEBIAN_NAMES = 1
+DEBIAN_NAMES = "1"