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:26:36 +0000
commit3ad2ecb603484fe57fd89f9e54c0eb90d1e00c2a (patch)
treec5ec08d999426377316c90acd2f2f1da2f2d602e /meta/classes/package.bbclass
parent734ae5f6479bd95eb2e6e1fafc1d95ce501f34e2 (diff)
downloadpoky-3ad2ecb603484fe57fd89f9e54c0eb90d1e00c2a.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. (From OE-Core rev: e414c6ec8563f9c448f1421f33870a908a0353b4) 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 () {
1065 fix_perms(each_file, fs_perms_table[dir].fmode, fs_perms_table[dir].fuid, fs_perms_table[dir].fgid, dir) 1065 fix_perms(each_file, fs_perms_table[dir].fmode, fs_perms_table[dir].fuid, fs_perms_table[dir].fgid, dir)
1066} 1066}
1067 1067
1068python split_and_strip_files () { 1068def package_debug_vars(d):
1069 import stat, errno
1070 import subprocess
1071
1072 dvar = d.getVar('PKGD')
1073 pn = d.getVar('PN')
1074 hostos = d.getVar('HOST_OS')
1075
1076 oldcwd = os.getcwd()
1077 os.chdir(dvar)
1078
1079 # We default to '.debug' style 1069 # We default to '.debug' style
1080 if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory': 1070 if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory':
1081 # Single debug-file-directory style debug info 1071 # Single debug-file-directory style debug info
@@ -1113,6 +1103,23 @@ python split_and_strip_files () {
1113 debugstaticlibdir = "" 1103 debugstaticlibdir = ""
1114 debugsrcdir = "/usr/src/debug" 1104 debugsrcdir = "/usr/src/debug"
1115 1105
1106 return (debugappend, debugstaticappend, debugdir, debugstaticdir,
1107 debuglibdir, debugstaticlibdir, debugsrcdir)
1108
1109python split_and_strip_files () {
1110 import stat, errno
1111 import subprocess
1112
1113 dvar = d.getVar('PKGD')
1114 pn = d.getVar('PN')
1115 hostos = d.getVar('HOST_OS')
1116
1117 oldcwd = os.getcwd()
1118 os.chdir(dvar)
1119
1120 debugappend, debugstaticappend, debugdir, debugstaticdir, \
1121 debuglibdir, debugstaticlibdir, debugsrcdir = package_debug_vars(d)
1122
1116 # 1123 #
1117 # First lets figure out all of the files we may have to process ... do this only once! 1124 # First lets figure out all of the files we may have to process ... do this only once!
1118 # 1125 #