* [PATCH 0/4] Addition minor fixes
@ 2011-03-11 0:03 Mark Hatle
2011-03-11 0:03 ` [PATCH 1/4] gcc-runtime: Ensure that gcc-runtime builds a debug package Mark Hatle
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mark Hatle @ 2011-03-11 0:03 UTC (permalink / raw)
To: poky
patch 1/4 has previous been submitted..
patch 2-4 are new works items.
(Patch 2/4) While working on debugging Zypper it was noted that all of
the zypper components ended up in the same directory in /usr/src/debug
on the target. The directory structure was adjusted slightly to ensure
we don't get any conflicts.
(patch 4/4) In addition when debugging C++ components, it's difficult
unless the python helpers are available. Fix the gcc-runtime recipe to
include the helpers.
(patch 3/4) We also fix a race condition where rpm package writing could
occur at the same time that the RPM solvedb is being generated. This
race could cause a failure.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/bernard/fixes
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/bernard/fixes
Thanks,
Mark Hatle <mark.hatle@windriver.com>
---
Mark Hatle (4):
gcc-runtime: Ensure that gcc-runtime builds a debug package
package.bbclass: Change the debug directory to avoid conflicts
package_rpm: Fix rootfs generation
gcc-runtime: Fix dbg files
meta/classes/package.bbclass | 10 ++++++++--
meta/classes/package_rpm.bbclass | 8 +++++++-
meta/recipes-devtools/gcc/gcc-package-runtime.inc | 8 ++++++++
meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb | 2 +-
4 files changed, 24 insertions(+), 4 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/4] gcc-runtime: Ensure that gcc-runtime builds a debug package 2011-03-11 0:03 [PATCH 0/4] Addition minor fixes Mark Hatle @ 2011-03-11 0:03 ` Mark Hatle 2011-03-11 0:03 ` [PATCH 2/4] package.bbclass: Change the debug directory to avoid conflicts Mark Hatle ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Mark Hatle @ 2011-03-11 0:03 UTC (permalink / raw) To: poky The gcc-runtime package will now create the proper dbg package. The RRECOMMENDS change is required to deal with the default. This is documented in bug 824. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/recipes-devtools/gcc/gcc-package-runtime.inc | 3 +++ meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc index e8c9011..04c70c0 100644 --- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc @@ -1,4 +1,5 @@ PACKAGES = "\ + ${PN}-dbg \ libstdc++ \ libstdc++-precompile-dev \ libstdc++-dev \ @@ -11,6 +12,8 @@ PACKAGES = "\ libmudflap \ libmudflap-dev \ " +# The base package doesn't exist, so we clear the recommends. +RRECOMMENDS_${PN}-dbg = "" FILES_libg2c = "${target_libdir}/libg2c.so.*" FILES_libg2c-dev = "\ diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb index 093f9bf..c1e680d 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb @@ -1,4 +1,4 @@ -PR = "r2" +PR = "r3" require gcc-${PV}.inc require gcc-configure-runtime.inc -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] package.bbclass: Change the debug directory to avoid conflicts 2011-03-11 0:03 [PATCH 0/4] Addition minor fixes Mark Hatle 2011-03-11 0:03 ` [PATCH 1/4] gcc-runtime: Ensure that gcc-runtime builds a debug package Mark Hatle @ 2011-03-11 0:03 ` Mark Hatle 2011-03-11 0:03 ` [PATCH 3/4] package_rpm: Fix rootfs generation Mark Hatle 2011-03-11 0:03 ` [PATCH 4/4] gcc-runtime: Fix dbg files Mark Hatle 3 siblings, 0 replies; 5+ messages in thread From: Mark Hatle @ 2011-03-11 0:03 UTC (permalink / raw) To: poky The debug directory before was below ${WORKDIR}. Unfortunately if something was based on a git tree, it meant that "git" was the directory name being preserved for usr/src/debug usage. The patch moves to using "${WORKDIR}/.." as the base, to ensure that the WORKDIR naming is used in usr/src/debug. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/classes/package.bbclass | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 137de09..a7a5894 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -180,6 +180,7 @@ def splitfile(file, debugfile, debugsrcdir, d): objcopy = bb.data.getVar("OBJCOPY", d, True) debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) workdir = bb.data.expand("${WORKDIR}", d) + workparentdir = os.path.dirname(workdir) sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) # We ignore kernel modules, we don't generate debug info files. @@ -194,7 +195,7 @@ def splitfile(file, debugfile, debugsrcdir, d): # We need to extract the debug src information here... if debugsrcdir: - os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workdir, debugsrcdir, sourcefile, file)) + os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file)) bb.mkdirhier(os.path.dirname(debugfile)) @@ -222,15 +223,20 @@ def splitfile2(debugsrcdir, d): objcopy = bb.data.getVar("OBJCOPY", d, True) debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) workdir = bb.data.expand("${WORKDIR}", d) + workparentdir = os.path.dirname(workdir) + workbasedir = os.path.basename(workdir) sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) if debugsrcdir: bb.mkdirhier("%s%s" % (dvar, debugsrcdir)) processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | " + # We need to ignore files that are not actually ours + # we do this by only paying attention to items from this package + processdebugsrc += "egrep -z '%s' | " processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)" - os.system(processdebugsrc % (sourcefile, workdir, dvar, debugsrcdir)) + os.system(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir)) # The copy by cpio may have resulted in some empty directories! Remove these for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] package_rpm: Fix rootfs generation 2011-03-11 0:03 [PATCH 0/4] Addition minor fixes Mark Hatle 2011-03-11 0:03 ` [PATCH 1/4] gcc-runtime: Ensure that gcc-runtime builds a debug package Mark Hatle 2011-03-11 0:03 ` [PATCH 2/4] package.bbclass: Change the debug directory to avoid conflicts Mark Hatle @ 2011-03-11 0:03 ` Mark Hatle 2011-03-11 0:03 ` [PATCH 4/4] gcc-runtime: Fix dbg files Mark Hatle 3 siblings, 0 replies; 5+ messages in thread From: Mark Hatle @ 2011-03-11 0:03 UTC (permalink / raw) To: poky [YOCTO #797] During rootfs generation, if other RPM packages are being wrtten this could cause a failure during the solvedb generation. We add a shared lock around the RPM package building. This will allow multiple RPM packages to continue to be written at the same time, but prevent rootfs generation and RPM package generation at the same time. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/classes/package_rpm.bbclass | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 60127d2..4647116 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -777,10 +777,16 @@ python do_package_rpm () { cmd = cmd + " --define 'debug_package %{nil}'" cmd = cmd + " -bb " + outspecfile - # Build the spec file! + # Take a shared lock, we can write multiple packages at the same time... + # but we need to stop the rootfs/solver from running while we do... + lf = bb.utils.lockfile(bb.data.expand("${DEPLOY_DIR_RPM}/rpm.lock", d), True) + + # Build the rpm package! bb.data.setVar('BUILDSPEC', cmd + "\n", d) bb.data.setVarFlag('BUILDSPEC', 'func', '1', d) bb.build.exec_func('BUILDSPEC', d) + + bb.utils.unlockfile(lf) } python () { -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] gcc-runtime: Fix dbg files 2011-03-11 0:03 [PATCH 0/4] Addition minor fixes Mark Hatle ` (2 preceding siblings ...) 2011-03-11 0:03 ` [PATCH 3/4] package_rpm: Fix rootfs generation Mark Hatle @ 2011-03-11 0:03 ` Mark Hatle 3 siblings, 0 replies; 5+ messages in thread From: Mark Hatle @ 2011-03-11 0:03 UTC (permalink / raw) To: poky In order to debug certain C++ items, you need the helper python components. These components should live in the -dbg package, ensure they are added to the recipe. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/recipes-devtools/gcc/gcc-package-runtime.inc | 5 +++++ meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc index 04c70c0..51483f9 100644 --- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc @@ -15,6 +15,11 @@ PACKAGES = "\ # The base package doesn't exist, so we clear the recommends. RRECOMMENDS_${PN}-dbg = "" +# include python debugging scripts +FILES_${PN}-dbg += "\ + ${libdir}/libstdc++.so.*-gdb.py \ + ${datadir}/gcc-${PV}/python/libstdcxx" + FILES_libg2c = "${target_libdir}/libg2c.so.*" FILES_libg2c-dev = "\ ${libdir}/libg2c.so \ diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb index c1e680d..9eb658b 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb +++ b/meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb @@ -1,4 +1,4 @@ -PR = "r3" +PR = "r4" require gcc-${PV}.inc require gcc-configure-runtime.inc -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-11 0:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-11 0:03 [PATCH 0/4] Addition minor fixes Mark Hatle 2011-03-11 0:03 ` [PATCH 1/4] gcc-runtime: Ensure that gcc-runtime builds a debug package Mark Hatle 2011-03-11 0:03 ` [PATCH 2/4] package.bbclass: Change the debug directory to avoid conflicts Mark Hatle 2011-03-11 0:03 ` [PATCH 3/4] package_rpm: Fix rootfs generation Mark Hatle 2011-03-11 0:03 ` [PATCH 4/4] gcc-runtime: Fix dbg files Mark Hatle
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.