[OE-core] [PATCH 1/2] package.bbclass: improve auto debug package splitting order
Hongxu Jia
hongxu.jia at windriver.com
Fri Sep 14 08:49:40 UTC 2018
Since `da5ec06 package: Add auto package splitting
of .debug files' applied in oe-core, the first dbg
package will have all debug files automatically.
If there are several sub dbg packages, except the
first one, the others are empty.
Even though var-NOAUTOPACKAGEDEBUG is provided for manual
control, but many recipes (such as in oe) requires to
pick up a few debug files into sub dbg packages, and then
split the rest to ${PN}-dbg. If set NOAUTOPACKAGEDEBUG = "1",
they have to do the extra splitting manually.
So improve splitting order, if ${PN}-dbg exists, split
the unsplit debug file to ${PN}-dbg, if ${PN}-dbg does not
exist, still split them to first dbg package.
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
meta/classes/package.bbclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d1e9138..cada46b 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1175,6 +1175,14 @@ python populate_packages () {
if "/.debug/" in path or path.endswith("/.debug"):
debug.append(path)
+ pn_dbg = pn + "-dbg"
+ # If ${PN}-dbg does not exist, use first *-dbg to replace
+ if pn_dbg not in package_list:
+ for pkg in package_list:
+ if pkg.endswith("-dbg"):
+ pn_dbg = pkg
+ break
+
for pkg in package_list:
root = os.path.join(pkgdest, pkg)
bb.utils.mkdirhier(root)
@@ -1188,7 +1196,7 @@ python populate_packages () {
origfiles = filesvar.split()
files, symlink_paths = files_from_filevars(origfiles)
- if autodebug and pkg.endswith("-dbg"):
+ if autodebug and pn_dbg == pkg:
files.extend(debug)
for file in files:
--
2.7.4
More information about the Openembedded-core
mailing list