summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2022-02-02 02:59:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-05 12:25:55 +0000
commite414c6ec8563f9c448f1421f33870a908a0353b4 (patch)
tree77003b7238ba944f88f24bc88780af1f70fe0d9c /meta/classes/package.bbclass
parent749264d5f6f86affbee3cfc096084e073c21c394 (diff)
downloadopenembedded-core-e414c6ec8563f9c448f1421f33870a908a0353b4.tar.gz
package: Split out package_debug_vars from split_and_strip_files
The split_and_strip_files() function is big and hard to follow. This takes a small step to improve that by splitting out the part that sets up the variables used to implement the various debug splitting methods specified by PACKAGE_DEBUG_SPLIT_STYLE. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass29
1 files changed, 18 insertions, 11 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 4927fb99ff..545471468c 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1065,17 +1065,7 @@ python fixup_perms () {
fix_perms(each_file, fs_perms_table[dir].fmode, fs_perms_table[dir].fuid, fs_perms_table[dir].fgid, dir)
}
-python split_and_strip_files () {
- import stat, errno
- import subprocess
-
- dvar = d.getVar('PKGD')
- pn = d.getVar('PN')
- hostos = d.getVar('HOST_OS')
-
- oldcwd = os.getcwd()
- os.chdir(dvar)
-
+def package_debug_vars(d):
# We default to '.debug' style
if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory':
# Single debug-file-directory style debug info
@@ -1113,6 +1103,23 @@ python split_and_strip_files () {
debugstaticlibdir = ""
debugsrcdir = "/usr/src/debug"
+ return (debugappend, debugstaticappend, debugdir, debugstaticdir,
+ debuglibdir, debugstaticlibdir, debugsrcdir)
+
+python split_and_strip_files () {
+ import stat, errno
+ import subprocess
+
+ dvar = d.getVar('PKGD')
+ pn = d.getVar('PN')
+ hostos = d.getVar('HOST_OS')
+
+ oldcwd = os.getcwd()
+ os.chdir(dvar)
+
+ debugappend, debugstaticappend, debugdir, debugstaticdir, \
+ debuglibdir, debugstaticlibdir, debugsrcdir = package_debug_vars(d)
+
#
# First lets figure out all of the files we may have to process ... do this only once!
#