openjdk-8: remove debuglink
PATCH 1/2 openjdk-8: remove debuglink
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
--- recipes-core/openjdk/openjdk-8-cross.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
recipes-core/openjdk/openjdk-8-cross.inc +16 -0
@@ -105,5 +105,21 @@ EXTRA_OEMAKE_append = '\ images \ ' +python remove_debuglink() { + dvar = d.getVar('PKGD', True) + objcopy = d.getVar("OBJCOPY", True) + + # Remove the previous debuglink if it has existed, because it has a different file name with that we will add. + if d.getVar('PN', True).find("jre") != -1: + file = dvar + d.getVar("JRE_HOME", True) + "/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + else: + file = dvar + d.getVar("JDK_HOME", True) + "/jre/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + + cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file) + oe.utils.getstatusoutput(cmd) +} + +PACKAGE_PREPROCESS_FUNCS += "remove_debuglink" + # There is a symlink to a .so but this one is valid. INSANE_SKIP_${PN} = "dev-so"
Signature · 1 line
2.11.0
PATCH 2/2 openjdk-8: combine the -dbg package
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
recipes-core/openjdk/openjdk-8_16xbyy.bb +3 -7
@@ -14,7 +14,6 @@ do_install() { } PACKAGES_append = " \ - ${PN}-demo-dbg \ ${PN}-demo \ ${PN}-source \ "
@@ -47,12 +46,6 @@ FILES_${PN}-dbg_append = "\ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/client/.debug/ \ -" - -FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " -RDEPENDS_${PN}-demo = " ${PN} " - -FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/gctest/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug/ \
@@ -64,6 +57,9 @@ FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug/ \ " +FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " +RDEPENDS_${PN}-demo = " ${PN} " + FILES_${PN}-doc_append = "\ ${JDK_HOME}/man \ ${JDK_HOME}/ASSEMBLY_EXCEPTION \
Signature · 1 line
2.11.0
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Hi,
thank you for you patch!
Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?
But I'm of course open for discussions ;-)
Quoted 5 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
regards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Quoted 10 lines · Richard Leitner
Hi,
thank you for you patch!Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
This may be OE's policy, if one recipe contain multiple -dbg package , other -dbg packages all will be a empty pacakge, only have one will contain all .debug file, you can see the source "meta/classes/package.bbclass"
1129 python populate_packages () {
1130 import glob, re
1156 for pkg in packages.split():
1157 if pkg in package_list:
1158 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1159 package_qa_handle_error("packages-list", msg, d)
1160 # If debug-with-srcpkg mode is enabled then the src package will have 1161 # priority over dbg package when assigning the files.
1162 # This allows src package to include source files and remove them from dbg. 1163 elif split_source_package and pkg.endswith("-src"):
1164 package_list.insert(0, pkg)
1165 elif autodebug and pkg.endswith("-dbg") and not split_source_package: <============== 1166 package_list.insert(0, pkg)
1167 else:
1168 package_list.append(pkg)
1169 d.setVar('PACKAGES', ' '.join(package_list))
1170 pkgdest = d.getVar('PKGDEST')
...
1177 debug = []
1178 for root, dirs, files in cpath.walk(dvar):
1179 dir = root[len(dvar):]
1180 if not dir:
1181 dir = os.sep
1182 for f in (files + dirs):
1183 path = "." + os.path.join(dir, f)
1184 if "/.debug/" in path or path.endswith("/.debug"): <============== 1185 debug.append(path)
1186
Quoted 5 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?
I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Quoted 8 lines
But I'm of course open for discussions ;-)
Quoted 4 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Quoted 35 lines · Wenlin Kang
Quoted 10 lines · Richard Leitner
Hi,
thank you for you patch!Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
This may be OE's policy, if one recipe contain multiple -dbg package , other -dbg packages all will be a empty pacakge, only have one will contain all .debug file, you can see the source "meta/classes/package.bbclass"
1129 python
populate_packages() {
1130 import glob, re1156 for pkg in
packages.split():
1157 if pkg inpackage_list:
1158 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1159package_qa_handle_error("packages-list", msg, d)
1160 # If debug-with-srcpkg mode is enabled then the src package will have 1161 # priority over dbg package when assigning the files.
1162 # This allows src package to include source files and remove them from dbg. 1163 elifsplit_source_packageandpkg.endswith("-src"):
1164package_list.insert(0, pkg)
1165 elif autodebug andpkg.endswith("-dbg")and not split_source_package: <============== 1166package_list.insert(0, pkg)
1167 else:
1168package_list.append(pkg)
1169d.setVar('PACKAGES', ' '.join(package_list))
1170 pkgdest =d.getVar('PKGDEST')
...
Quoted 10 lines
1177 debug = []
1178 for root, dirs, files incpath.walk(dvar):
1179 dir = root[len(dvar):]
1180 if not dir:
1181 dir = os.sep
1182 for f in (files + dirs):
1183 path = "." +os.path.join(dir, f)
1184 if "/.debug/" in path or path.endswith("/.debug"): <============== 1185debug.append(path)
1186
1187 for pkg in package_list:
1188 root = os.path.join(pkgdest, pkg)
1189 bb.utils.mkdirhier(root)
1190
1191 filesvar = d.getVar('FILES_%s' % pkg) or ""
1192 if "//" in filesvar:
1193 msg = "FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg 1194 package_qa_handle_error("files-invalid", msg, d)
1195 filesvar.replace("//", "/")
1196
1197 origfiles = filesvar.split()
1198 files, symlink_paths = files_from_filevars(origfiles)
1199
1200 if autodebug and pkg.endswith("-dbg"): <============
1201 files.extend(debug) <============
Quoted 20 lines
Quoted 6 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Quoted 8 lines
But I'm of course open for discussions ;-)
Quoted 4 lines
Signed-off-by Wenlin Kang <[email protected]>---
recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++-------1 file changed, 3 insertions(+), 7 deletions(-)regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
In reply to Wenlin KangQuoted 8 lines · Wenlin Kang
Quoted 7 lines · Richard Leitner
Hi,
thank you for you patch!Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Quoted 6 lines
Quoted 3 lines
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
This may be OE's policy, if one recipe contain multiple -dbg package , other -dbg packages all will be a empty pacakge, only have one will contain all .debug file, you can see the source "meta/classes/package.bbclass"
But obviously the demo-dbg package isn't empty because it has its "FILES" defined ;-)
Quoted 33 lines
1129 python
populate_packages() {
1130 import glob, re1156 for pkg in
packages.split():
1157 if pkg inpackage_list:
1158 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1159package_qa_handle_error("packages-list", msg, d)
1160 # If debug-with-srcpkg mode is enabled then the src package will have 1161 # priority over dbg package when assigning the files.
1162 # This allows src package to include source files and remove them from dbg. 1163 elifsplit_source_packageandpkg.endswith("-src"):
1164package_list.insert(0, pkg)
1165 elif autodebug andpkg.endswith("-dbg")and not split_source_package: <============== 1166package_list.insert(0, pkg)
1167 else:
1168package_list.append(pkg)
1169d.setVar('PACKAGES', ' '.join(package_list))
1170 pkgdest =d.getVar('PKGDEST')
...1177 debug = []
1178 for root, dirs, files incpath.walk(dvar):
1179 dir = root[len(dvar):]
1180 if not dir:
1181 dir = os.sep
1182 for f in (files + dirs):
1183 path = "." +os.path.join(dir, f)
1184 if "/.debug/" in path or path.endswith("/.debug"): <============== 1185debug.append(path)
1186Quoted 1 line
Quoted 7 lines
Quoted 4 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Do you have a pointer to this discussion (or if it exists to the according documentation) for us?
Thanks & regards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Hi Richard,
Quoted 56 lines · Richard Leitner
Quoted 8 lines · Wenlin Kang
Quoted 7 lines · Richard Leitner
Hi,
thank you for you patch!Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Quoted 6 lines
Quoted 3 lines
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
This may be OE's policy, if one recipe contain multiple -dbg package , other -dbg packages all will be a empty pacakge, only have one will contain all .debug file, you can see the source "meta/classes/package.bbclass"
But obviously the demo-dbg package isn't empty because it has its "FILES" defined ;-)
Quoted 38 lines
1129 python
populate_packages() {
1130 import glob, re1156 for pkg in
packages.split():
1157 if pkg inpackage_list:
1158 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1159package_qa_handle_error("packages-list", msg, d)
1160 # If debug-with-srcpkg mode is enabled then the src package will have 1161 # priority over dbg package when assigning the files.
1162 # This allows src package to include source files and remove them from dbg. 1163 elifsplit_source_packageandpkg.endswith("-src"):
1164package_list.insert(0, pkg)
1165 elif autodebug andpkg.endswith("-dbg")and not split_source_package: <============== 1166package_list.insert(0, pkg)
1167 else:
1168package_list.append(pkg)
1169d.setVar('PACKAGES', ' '.join(package_list))
1170 pkgdest =d.getVar('PKGDEST')
...1177 debug = []
1178 for root, dirs, files incpath.walk(dvar):
1179 dir = root[len(dvar):]
1180 if not dir:
1181 dir = os.sep
1182 for f in (files + dirs):
1183 path = "." +os.path.join(dir, f)
1184 if "/.debug/" in path or path.endswith("/.debug"): <============== 1185debug.append(path)
1186Quoted 5 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?
Quoted 4 lines
Quoted 2 lines
I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Do you have a pointer to this discussion (or if it exists to the according documentation) for us?
For oe-core's recipes, each recipe only has one dbg package, split dbg packages doesn't make any sense since they usually can't be run independently. Please see oe-core's commit:
commit a3b000643898d7402b9e57c02e8d10e677cc9722
Author: Ross Burton <[email protected]> Date: Tue Dec 15 16:32:43 2015 +0000
meta: more removals of redunant FILES_${PN}-dbg
In some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package.
// Robert
// Robert
Quoted 3 lines
Thanks & regards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Hi,
Quoted 5 lines · Robert Yang
Hi Richard,
Quoted 2 lines · Richard Leitner
Quoted 1 line · Wenlin Kang
On 2018年06月08日 15:39, Richard Leitner wrote:
...
Quoted 15 lines
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Do you have a pointer to this discussion (or if it exists to the according documentation) for us?
For oe-core's recipes, each recipe only has one dbg package, split dbg packages doesn't make any sense since they usually can't be run independently. Please see oe-core's commit:
Quoted 8 lines
commit
a3b000643898d7402b9e57c02e8d10e677cc9722
Author: Ross Burton <[email protected]>
Date: Tue Dec 15 16:32:43 2015 +0000meta: more removals of redunant FILES_${PN}-dbg
In some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package.
Ok. Thank you for that pointer. That's definitely new to me, but I'm of course fine with it!
regards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
In reply to Richard LeitnerQuoted 9 lines · Richard Leitner
Quoted 8 lines · Wenlin Kang
Quoted 7 lines · Richard Leitner
Hi,
thank you for you patch!Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Why should one recipe, altough it conains multiple packages have only one dbg package? Shouldn't the openjdk-8-demo-dbg package contain the debug information for the openjdk-8-demo package?
This may be OE's policy, if one recipe contain multiple -dbg package , other -dbg packages all will be a empty pacakge, only have one will contain all .debug file, you can see the source "meta/classes/package.bbclass"
But obviously the demo-dbg package isn't empty because it has its "FILES" defined ;-)
Hi Richard
You can check each -dbg directory under packages-split/, will find only one -dbg package has .debug file.
Quoted 41 lines
Quoted 32 lines
1129 python
populate_packages() {
1130 import glob, re1156 for pkg in
packages.split():
1157 if pkg inpackage_list:
1158 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1159package_qa_handle_error("packages-list", msg, d)
1160 # If debug-with-srcpkg mode is enabled then the src package will have 1161 # priority over dbg package when assigning the files.
1162 # This allows src package to include source files and remove them from dbg. 1163 elifsplit_source_packageandpkg.endswith("-src"):
1164package_list.insert(0, pkg)
1165 elif autodebug andpkg.endswith("-dbg")and not split_source_package: <============== 1166package_list.insert(0, pkg)
1167 else:
1168package_list.append(pkg)
1169d.setVar('PACKAGES', ' '.join(package_list))
1170 pkgdest =d.getVar('PKGDEST')
...1177 debug = []
1178 for root, dirs, files incpath.walk(dvar):
1179 dir = root[len(dvar):]
1180 if not dir:
1181 dir = os.sep
1182 for f in (files + dirs):
1183 path = "." +os.path.join(dir, f)
1184 if "/.debug/" in path or path.endswith("/.debug"): <============== 1185debug.append(path)
1186Quoted 6 lines
Quoted 4 lines
Nonehteless according to my first quick test the demo-dbg package contains lots of other debug information too...
So maybe it would be the better way to fix the content of the different dbg packages rather than removing one?I also thought this, but after discussing with the other guys, the result is a recipe can only have a -dbg package, and this is OE's policy.
Do you have a pointer to this discussion (or if it exists to the according documentation) for us?
Thanks & regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
In reply to Wenlin KangHi Wenlin,
as we clarified the "one -dbg package per recipe" thing I have some comments on the patch itself.
Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
May you please include a reference to that statement from "Ross Burton"?
Quoted 32 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-7@@ -14,7 +14,6 @@ do_install() { } PACKAGES_append = " \ - ${PN}-demo-dbg \ ${PN}-demo \ ${PN}-source \ "@@ -47,12 +46,6 @@ FILES_${PN}-dbg_append = "\ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/client/.debug/ \ -" - -FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " -RDEPENDS_${PN}-demo = " ${PN} " - -FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/gctest/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug/ \
recipes-core/openjdk/openjdk-8_16xbyy.bb FILES_${PN}-demo-dbg = "\ · line 58
Quoted 2 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-0@@ -64,6 +57,9 @@ FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug/ \ "
AFAIK as all ".debug" are included in the -dbg packages it should be fine if you remove the whole FILES_${PN}-dbg_append definition.
recipes-core/openjdk/openjdk-8_16xbyy.bb FILES_${PN}-demo-dbg = "\ · line 65
Quoted 7 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +3
-0+FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " +RDEPENDS_${PN}-demo = " ${PN} " + FILES_${PN}-doc_append = "\ ${JDK_HOME}/man \ ${JDK_HOME}/ASSEMBLY_EXCEPTION \
thanks®ards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
On 2018年06月12日 16:01, Richard Leitner wrote:
Hi Richard
Quoted 10 lines
Hi Wenlin,
as we clarified the "one -dbg package per recipe" thing I have some comments on the patch itself.Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
May you please include a reference to that statement from "Ross Burton"?
What about changing the comments as below:
openjdk-8: remove redunant FILES_${PN}-dbg
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Comments(oe-core's commit a3b000643898d7402b9e57c02e8d10e677cc9722) from Ross Burton as below:
"meta: more removals of redunant FILES_${PN}-dbg
In some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package. "
Quoted 28 lines
Quoted 28 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-7@@ -14,7 +14,6 @@ do_install() { } PACKAGES_append = " \ - ${PN}-demo-dbg \ ${PN}-demo \ ${PN}-source \ "@@ -47,12 +46,6 @@ FILES_${PN}-dbg_append = "\ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/client/.debug/ \ -" - -FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " -RDEPENDS_${PN}-demo = " ${PN} " - -FILES_${PN}-demo-dbg = "\
Quoted 8 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb FILES_${PN}-demo-dbg = "\ · line 58
Quoted 6 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-0${JDK_HOME}/demo/jvmti/gctest/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug/ \@@ -64,6 +57,9 @@ FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug/ \ "AFAIK as all ".debug" are included in the -dbg packages it should be fine if you remove the whole FILES_${PN}-dbg_append definition.
I have tested it, that's OK after remove the whole FILES_${PN}-dbg_append definition.
Do you mean that we should also remove FILES_${PN}-dbg_append?
Quoted 11 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb FILES_${PN}-demo-dbg = "\ · line 65
Quoted 8 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +3
-0+FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " +RDEPENDS_${PN}-demo = " ${PN} " + FILES_${PN}-doc_append = "\ ${JDK_HOME}/man \ ${JDK_HOME}/ASSEMBLY_EXCEPTION \thanks®ards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Quoted 23 lines · Wenlin Kang
On 2018年06月12日 16:01, Richard Leitner wrote:
Hi Richard
Quoted 10 lines
Hi Wenlin,
as we clarified the "one -dbg package per recipe" thing I have some comments on the patch itself.Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
May you please include a reference to that statement from "Ross Burton"?
What about changing the comments as below:
openjdk-8: remove redunant FILES_${PN}-dbg
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Quoted 7 lines
Comments(oe-core's commit
a3b000643898d7402b9e57c02e8d10e677cc9722) from Ross Burton as below:
"meta: more removals of redunant FILES_${PN}-dbgIn some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package. "
That's fine with me.
Quoted 37 lines
Quoted 28 lines
Quoted 28 lines
Signed-off-by Wenlin Kang <[email protected]>---
recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++-------1 file changed, 3 insertions(+), 7 deletions(-)recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-1@@ -14,7 +14,6 @@ do_install() { } PACKAGES_append = " \ - ${PN}-demo-dbg \ ${PN}-demo \ ${PN}-source \"
recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-6@@ -47,12 +46,6 @@ FILES_${PN}-dbg_append = "\ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/client/.debug/ \ -" - -FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " -RDEPENDS_${PN}-demo = " ${PN} " - -FILES_${PN}-demo-dbg = "\Quoted 8 lines
Quoted 6 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-0${JDK_HOME}/demo/jvmti/gctest/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug/ \@@ -64,6 +57,9 @@ FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug/ \"
AFAIK as all ".debug" are included in the -dbg packages it should be fine if you remove the whole FILES_${PN}-dbg_append definition.
Quoted 3 lines
I have tested it, that's OK after remove the whole FILES_${PN}-dbg_append definition.
Do you mean that we should also remove FILES_${PN}-dbg_append?
As there is AFAIK no reason to keep it... Yes please!
thanks®ards;Richard.L
Re: [meta-java][PATCH 2/2] openjdk-8: combine the -dbg package
Quoted 66 lines · Richard Leitner
Quoted 22 lines · Wenlin Kang
On 2018年06月12日 16:01, Richard Leitner wrote:
Hi Richard
Quoted 10 lines
Hi Wenlin,
as we clarified the "one -dbg package per recipe" thing I have some comments on the patch itself.Quoted 3 lines · Wenlin Kang
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
May you please include a reference to that statement from "Ross Burton"?
What about changing the comments as below:
openjdk-8: remove redunant FILES_${PN}-dbg
One recipe should only have one -dbg package, because OE only picks up all .debug file into the last one -dbg package listed in variable PACKAGES.
Quoted 7 lines
Comments(oe-core's commit
a3b000643898d7402b9e57c02e8d10e677cc9722) from Ross Burton as below:
"meta: more removals of redunant FILES_${PN}-dbgIn some recipes overly-split -dbg packages were merged into PN-dbg. Unless there's a very good reason, recipes should have a single -dev and -dbg package. "
That's fine with me.
Quoted 34 lines
Quoted 34 lines
Quoted 30 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8_16xbyy.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-7@@ -14,7 +14,6 @@ do_install() { } PACKAGES_append = " \ - ${PN}-demo-dbg \ ${PN}-demo \ ${PN}-source \ "@@ -47,12 +46,6 @@ FILES_${PN}-dbg_append = "\ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug/ \ ${JDK_HOME}/jre/lib/${JDK_ARCH}/client/.debug/ \ -" - -FILES_${PN}-demo = " ${JDK_HOME}/demo ${JDK_HOME}/sample " -RDEPENDS_${PN}-demo = " ${PN} " - -FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/gctest/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug/ \ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug/ \recipes-core/openjdk/openjdk-8_16xbyy.bb FILES_${PN}-demo-dbg = "\ · line 58
Quoted 2 lines
recipes-core/openjdk/openjdk-8_16xbyy.bb +0
-0@@ -64,6 +57,9 @@ FILES_${PN}-demo-dbg = "\ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug/ \ "AFAIK as all ".debug" are included in the -dbg packages it should be fine if you remove the whole FILES_${PN}-dbg_append definition.
Quoted 4 lines
Quoted 3 lines
I have tested it, that's OK after remove the whole FILES_${PN}-dbg_append definition.
Do you mean that we should also remove FILES_${PN}-dbg_append?
As there is AFAIK no reason to keep it... Yes please!
Thanks, later I will send the new patch.
Quoted 3 lines
thanks®ards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Hi Wenlin,
Quoted 2 lines · Wenlin Kang
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
I'm sorry but I don't get the reason why we need this...
It would be great if you may please explain it in a little more detail for me ;-)
Thank you very much!
Quoted 22 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8-cross.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)recipes-core/openjdk/openjdk-8-cross.inc +8
-0@@ -105,5 +105,21 @@ EXTRA_OEMAKE_append = '\ images \ ' +python remove_debuglink() { + dvar = d.getVar('PKGD', True) + objcopy = d.getVar("OBJCOPY", True) + + # Remove the previous debuglink if it has existed, because it has a different file name with that we will add. + if d.getVar('PN', True).find("jre") != -1: + file = dvar + d.getVar("JRE_HOME", True) + "/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + else:
recipes-core/openjdk/openjdk-8-cross.inc EXTRA_OEMAKE_append = '\ · line 125
Quoted 10 lines
recipes-core/openjdk/openjdk-8-cross.inc +8
-0+ file = dvar + d.getVar("JDK_HOME", True) + "/jre/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + + cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file) + oe.utils.getstatusoutput(cmd) +} + +PACKAGE_PREPROCESS_FUNCS += "remove_debuglink" + # There is a symlink to a .so but this one is valid. INSANE_SKIP_${PN} = "dev-so"
regards;Richard.L
Quoted 7 lines · Richard Leitner
Hi Wenlin,
Quoted 2 lines · Wenlin Kang
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
I'm sorry but I don't get the reason why we need this...
It would be great if you may please explain it in a little more detail for me ;-)
Hi Richard
In openjdk-8, its debug file is xxx.debuginfo, and when execute openjdk's makefile, it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will add in splitdebuginfo() of package.bbclass, this makes we can't get symbol information when debug libjvm.so in gdb.
Quoted 37 lines
Thank you very much!
Quoted 22 lines
Signed-off-by Wenlin Kang <[email protected]>--- recipes-core/openjdk/openjdk-8-cross.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)recipes-core/openjdk/openjdk-8-cross.inc +8
-0@@ -105,5 +105,21 @@ EXTRA_OEMAKE_append = '\ images \ ' +python remove_debuglink() { + dvar = d.getVar('PKGD', True) + objcopy = d.getVar("OBJCOPY", True) + + # Remove the previous debuglink if it has existed, because it has a different file name with that we will add. + if d.getVar('PN', True).find("jre") != -1: + file = dvar + d.getVar("JRE_HOME", True) + "/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + else:recipes-core/openjdk/openjdk-8-cross.inc EXTRA_OEMAKE_append = '\ · line 125
Quoted 10 lines
recipes-core/openjdk/openjdk-8-cross.inc +8
-0+ file = dvar + d.getVar("JDK_HOME", True) + "/jre/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so" + + cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file) + oe.utils.getstatusoutput(cmd) +} + +PACKAGE_PREPROCESS_FUNCS += "remove_debuglink" + # There is a symlink to a .so but this one is valid. INSANE_SKIP_${PN} = "dev-so"regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Quoted 9 lines · Wenlin Kang
Quoted 7 lines · Richard Leitner
Hi Wenlin,
Quoted 2 lines · Wenlin Kang
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
I'm sorry but I don't get the reason why we need this...
It would be great if you may please explain it in a little more detail for me ;-)
Quoted 7 lines
Hi Richard
In openjdk-8, its debug file is xxx.debuginfo, and when execute openjdk's makefile, it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will add in
splitdebuginfo()of package.bbclass, this makes we can't get symbol information when debug libjvm.so in gdb.
When a executable file or library file has contained the debuglink section, it will not be changed when added again, so we must remove it after add new one.
In OE-core, debug file name is the same with the executable file or library file.
Quoted 41 lines
Quoted 40 lines
Thank you very much!
Quoted 32 lines
Signed-off-by Wenlin Kang <[email protected]>---
recipes-core/openjdk/openjdk-8-cross.inc | 16 ++++++++++++++++1 file changed, 16 insertions(+)recipes-core/openjdk/openjdk-8-cross.inc +0
-0@@ -105,5 +105,21 @@ EXTRA_OEMAKE_append = '\ images \'
+pythonremove_debuglink(){
+ dvar =d.getVar('PKGD', True)
+ objcopy =d.getVar("OBJCOPY", True)
+
+ # Remove the previous debuglink if it has existed, because it has a different file name with that we will add.
+ ifd.getVar('PN', True).find("jre") != -1:
+ file = dvar +d.getVar("JRE_HOME", True)+ "/lib/" +d.getVar("JDK_ARCH", True)+ "/server/libjvm.so"
+ else:
+ file = dvar +d.getVar("JDK_HOME", True)+ "/jre/lib/" +d.getVar("JDK_ARCH", True)+ "/server/libjvm.so"
+
+ cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file)
+oe.utils.getstatusoutput(cmd)recipes-core/openjdk/openjdk-8-cross.inc +4
-0+} + +PACKAGE_PREPROCESS_FUNCS += "remove_debuglink" +Quoted 3 lines
# There is a symlink to a .so but this one is valid. INSANE_SKIP_${PN} = "dev-so"
regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Quoted 18 lines · Wenlin Kang
Quoted 9 lines · Wenlin Kang
Quoted 7 lines · Richard Leitner
Hi Wenlin,
Quoted 2 lines · Wenlin Kang
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
I'm sorry but I don't get the reason why we need this...
It would be great if you may please explain it in a little more detail for me ;-)Quoted 7 lines
Hi Richard
In openjdk-8, its debug file is xxx.debuginfo, and when execute openjdk's makefile, it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will add in
splitdebuginfo()of package.bbclass, this makes we can't get symbol information when debug libjvm.so in gdb.
Quoted 5 lines
When a executable file or library file has contained the debuglink section, it will not be changed when added again, so we must remove it after add new one.
In OE-core, debug file name is the same with the executable file or library file.
Thank you for that explanation!
Maybe you can add this (or a shortened version of it) to the commit message. Otherwise this patch is fine with me.
So please send a v2 of this series whenever you like!
regards;Richard.L
Quoted 20 lines · Richard Leitner
Quoted 19 lines · Wenlin Kang
Quoted 6 lines · Wenlin Kang
Quoted 5 lines · Richard Leitner
Hi Wenlin,
Quoted 2 lines · Wenlin Kang
We need remove previous debuglink before add it if it has existed, because it may have a different file name with this that we will add.
Quoted 9 lines
Quoted 2 lines
I'm sorry but I don't get the reason why we need this...
It would be great if you may please explain it in a little more detail for me ;-)Hi Richard
In openjdk-8, its debug file is xxx.debuginfo, and when execute openjdk's makefile, it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will add in
splitdebuginfo()of package.bbclass, this makes we can't get symbol information when debug libjvm.so in gdb.When a executable file or library file has contained the debuglink section, it will not be changed when added again, so we must remove it after add new one.
Quoted 6 lines
Quoted 2 lines
In OE-core, debug file name is the same with the executable file or library file.
Thank you for that explanation!
Maybe you can add this (or a shortened version of it) to the commit message. Otherwise this patch is fine with me.
Hi Richard
What about changing the comments as below ?
openjdk-8: remove debuglink
During openjdk-8 compiling, its debug file is xxx.debuginfo, and it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will create and add in splitdebuginfo() of package.bbclass, in oe-core, the debug file name is the same with the corresponding executable file or library file, this will make we can't get symbol information when debug libjvm.so in gdb, so we must remove the previous debuglink before add it if it has existed(if a file has contained the debuglink section, it will not be changed when add again).
Quoted 5 lines
So please send a v2 of this series whenever you like!
regards;Richard.L
Signature · 2 lines
Thanks, Wenlin Kang
Quoted 2 lines · Wenlin Kang
Quoted 1 line · Richard Leitner
On 06/12/2018 02:02 PM, Wenlin Kang wrote:
...
Quoted 8 lines
Quoted 4 lines
Maybe you can add this (or a shortened version of it) to the commit message.
Otherwise this patch is fine with me.Hi Richard
What about changing the comments as below ?
That's fine with me. Thanks!
Quoted 14 lines
openjdk-8: remove debuglink
During openjdk-8 compiling, its debug file is xxx.debuginfo, and it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will create and add in
splitdebuginfo()of package.bbclass, in oe-core, the debug file name is the same with the corresponding executable file or library file, this will make we can't get symbol information when debug libjvm.so in gdb, so we must remove the previous debuglink before add it if it hasexisted(if a file has contained the debuglink section, it will not be changed when add again).Quoted 2 lines
So please send a v2 of this series whenever you like!