* [PATCH 0/4] Refactor debug info generation
@ 2011-02-11 14:55 Mark Hatle
2011-02-11 14:55 ` [PATCH 1/4] package.bbclass: Breakout the strip from the populate_packages Mark Hatle
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mark Hatle @ 2011-02-11 14:55 UTC (permalink / raw)
To: poky
The primary purpose of this patch is to refactor the way the -dbg packages
and associated files are generated. In the original code it's being done
in one operation with the splitting and stripping of the files within the
populate_packages. The code was split from there, and then modified in two
steps to get to the final version.
The first step implemented the new method where the split occurs and then the
strip occurs. This makes it easier to tailor each of them as things change
in the future.
The second path refactors this to eleminate multiple file walks and file
identification processing. The behavior of the system is the same, only
things are more efficient.
The fourth patch is simply a bug fix to some pre/post actions I found
while diagnosing and debugging. This patch is separate from the rest of the
refactoring and should be merged, even if the others are not.
FYI, I also did timing on this to see how it impacted system performance.
The times below affect ONLY the do_package [and later] stages, on my specific
host. (8 core with a 16/16 build configuration)
Original before these changes:
real 37m29.035s
user 41m14.322s
sys 31m0.006s
After the changes -- using "debian" style debuginfo, i.e. the same output
as the original style:
real 36m48.160s
user 42m17.636s
sys 31m47.846s
After the changes -- using the new "fedora" style debug info:
real 38m48.793s
user 44m9.822s
sys 37m48.803s
The first two are nearly the same. Any deviation is likely due to the
additional hardlink/symlink processing.
The fedora style introduces additional steps in the process that rewrite
source code references and duplicate specific source code files into the
-dbg directory for later (easier) debugging.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: mhatle/debuginfo
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/debuginfo
Thanks,
Mark Hatle <mark.hatle@windriver.com>
---
Mark Hatle (4):
package.bbclass: Breakout the strip from the populate_packages
Revise stripping and splitting of debug information
package.bbclass: Refactor split and strip function
recipes: pre/post actions
meta/classes/insane.bbclass | 4 +-
meta/classes/package.bbclass | 325 +++++++++++++++++---
meta/conf/bitbake.conf | 7 +-
meta/conf/local.conf.sample | 28 ++
meta/recipes-bsp/hostap/hostap-conf_1.0.bb | 4 +-
meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 4 +-
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb | 4 +-
.../libnss-mdns/libnss-mdns_0.10.bb | 4 +-
.../ppp-dialin/ppp-dialin_0.1.bb | 4 +-
.../recipes-core/base-passwd/base-passwd_3.5.22.bb | 2 +-
meta/recipes-core/dropbear/dropbear.inc | 4 +-
.../sgml-common/sgml-common_0.6.3.bb | 4 +-
meta/recipes-extended/bash/bash.inc | 2 +-
meta/recipes-extended/bash/bash_3.2.48.bb | 2 +-
meta/recipes-extended/sudo/sudo.inc | 2 +-
.../ttf-fonts/liberation-fonts_1.04.bb | 2 +-
.../ttf-fonts/liberation-fonts_1.06.bb | 2 +-
.../ttf-fonts/ttf-bitstream-vera_1.10.bb | 2 +-
.../update-modules/update-modules_1.0.bb | 2 +-
19 files changed, 340 insertions(+), 68 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] package.bbclass: Breakout the strip from the populate_packages
2011-02-11 14:55 [PATCH 0/4] Refactor debug info generation Mark Hatle
@ 2011-02-11 14:55 ` Mark Hatle
2011-02-11 14:56 ` [PATCH 2/4] Revise stripping and splitting of debug information Mark Hatle
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2011-02-11 14:55 UTC (permalink / raw)
To: poky
Break out the file split/strip from the populate_packages.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package.bbclass | 58 ++++++++++++++++++++++++++----------------
1 files changed, 36 insertions(+), 22 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index fd29aaa..fa1abf0 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -11,24 +11,27 @@
#
# b) package_do_split_locales - Split out the locale files, updates FILES and PACKAGES
#
-# c) populate_packages - Split the files in PKGD into separate packages in PKGDEST/<pkgname>
+# c) split_and_strip_files - split the files into runtime and debug and strip them.
+# Debug files include debug info split, and associated sources that end up in -dbg packages
+#
+# d) populate_packages - Split the files in PKGD into separate packages in PKGDEST/<pkgname>
# Also triggers the binary stripping code to put files in -dbg packages.
#
-# d) package_do_filedeps - Collect perfile run-time dependency metadata
+# e) package_do_filedeps - Collect perfile run-time dependency metadata
# The data is stores in FILER{PROVIDES,DEPENDS}_file_pkg variables with
# a list of affected files in FILER{PROVIDES,DEPENDS}FLIST_pkg
#
-# e) package_do_shlibs - Look at the shared libraries generated and autotmatically add any
+# f) package_do_shlibs - Look at the shared libraries generated and autotmatically add any
# depenedencies found. Also stores the package name so anyone else using this library
# knows which package to depend on.
#
-# f) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
+# g) package_do_pkgconfig - Keep track of which packages need and provide which .pc files
#
-# g) read_shlibdeps - Reads the stored shlibs information into the metadata
+# h) read_shlibdeps - Reads the stored shlibs information into the metadata
#
-# h) package_depchains - Adds automatic dependencies to -dbg and -dev packages
+# i) package_depchains - Adds automatic dependencies to -dbg and -dev packages
#
-# i) emit_pkgdata - saves the packaging data into PKGDATA_DIR for use in later
+# j) emit_pkgdata - saves the packaging data into PKGDATA_DIR for use in later
# packaging steps
inherit packagedata
@@ -163,7 +166,7 @@ python () {
}
def runstrip(file, d):
- # Function to strip a single file, called from populate_packages below
+ # Function to strip a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
# is necessary for this stuff to work, hence the addition to do_package[depends]
@@ -329,16 +332,11 @@ python perform_packagecopy () {
os.system('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar))
}
-python populate_packages () {
- import glob, stat, errno, re
+python split_and_strip_files () {
+ import stat
- workdir = bb.data.getVar('WORKDIR', d, True)
- outdir = bb.data.getVar('DEPLOY_DIR', d, True)
dvar = bb.data.getVar('PKGD', d, True)
- packages = bb.data.getVar('PACKAGES', d, True)
- pn = bb.data.getVar('PN', d, True)
- bb.mkdirhier(outdir)
os.chdir(dvar)
def isexec(path):
@@ -348,6 +346,28 @@ python populate_packages () {
return 0
return (s[stat.ST_MODE] & stat.S_IEXEC)
+ # Figure out which packages we want to process
+ if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
+ for root, dirs, files in os.walk(dvar):
+ for f in files:
+ file = os.path.join(root, f)
+ if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
+ runstrip(file, d)
+
+}
+
+python populate_packages () {
+ import glob, stat, errno, re
+
+ workdir = bb.data.getVar('WORKDIR', d, True)
+ outdir = bb.data.getVar('DEPLOY_DIR', d, True)
+ dvar = bb.data.getVar('PKGD', d, True)
+ packages = bb.data.getVar('PACKAGES', d, True)
+ pn = bb.data.getVar('PN', d, True)
+
+ bb.mkdirhier(outdir)
+ os.chdir(dvar)
+
# Sanity check PACKAGES for duplicates - should be moved to
# sanity.bbclass once we have the infrastucture
package_list = []
@@ -360,13 +380,6 @@ python populate_packages () {
else:
package_list.append(pkg)
- if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
- for root, dirs, files in os.walk(dvar):
- for f in files:
- file = os.path.join(root, f)
- if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
- runstrip(file, d)
-
pkgdest = bb.data.getVar('PKGDEST', d, True)
os.system('rm -rf %s' % pkgdest)
@@ -1081,6 +1094,7 @@ PACKAGE_PREPROCESS_FUNCS ?= ""
PACKAGEFUNCS ?= "perform_packagecopy \
${PACKAGE_PREPROCESS_FUNCS} \
package_do_split_locales \
+ split_and_strip_files \
populate_packages \
package_do_filedeps \
package_do_shlibs \
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] Revise stripping and splitting of debug information
2011-02-11 14:55 [PATCH 0/4] Refactor debug info generation Mark Hatle
2011-02-11 14:55 ` [PATCH 1/4] package.bbclass: Breakout the strip from the populate_packages Mark Hatle
@ 2011-02-11 14:56 ` Mark Hatle
2011-02-11 14:56 ` [PATCH 3/4] package.bbclass: Refactor split and strip function Mark Hatle
2011-02-11 14:56 ` [PATCH 4/4] recipes: pre/post actions Mark Hatle
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2011-02-11 14:56 UTC (permalink / raw)
To: poky
We now support two styles of debug information generation, the 'debian' style,
which is the same as previously implemented. This style simply splits the
debug information and makes it available in the same general directory.
The new 'fedora' style splits the debug information and places it into
/usr/lib/debug/<path>/<file>.debug
It also has the ability to include an referenced source code into a new
/usr/src/debug/<path> directory.
File stripping is now handled as a seperate operation from file splitting.
This allows us to split the debug information, but also leave it in the
original file -- or prevent the debug information from being split.
Also enhance the comments within local.conf.sample to provide a better
understanding of the control the user has over debug file generation.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/insane.bbclass | 4 +-
meta/classes/package.bbclass | 233 +++++++++++++++++++++++++++++++++++++-----
meta/conf/bitbake.conf | 7 +-
meta/conf/local.conf.sample | 28 +++++
4 files changed, 242 insertions(+), 30 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5d3ef92..b376470 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -192,8 +192,8 @@ def package_qa_check_dev(path, name,d, elf):
sane = True
- if not name.endswith("-dev") and path.endswith(".so") and os.path.islink(path):
- error_msg = "non -dev package contains symlink .so: %s path '%s'" % \
+ if not name.endswith("-dev") and not name.endswith("-dbg") and path.endswith(".so") and os.path.islink(path):
+ error_msg = "non -dev/-dbg package contains symlink .so: %s path '%s'" % \
(name, package_qa_clean_path(path,d))
sane = package_qa_handle_error(0, error_msg, name, path, d)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index fa1abf0..94dbdcc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -165,32 +165,88 @@ python () {
d.setVar("PACKAGERDEPTASK", "")
}
-def runstrip(file, d):
- # Function to strip a single file, called from split_and_strip_files below
+def splitfile(file, debugfile, debugsrcdir, d):
+ # Function to split a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
- # is necessary for this stuff to work, hence the addition to do_package[depends]
+ # is split and the split off portions go to debugfile.
+ #
+ # The debug information is then processed for src references. These
+ # references are copied to debugsrcdir, if defined.
import commands, stat
+ dvar = bb.data.getVar('PKGD', d, True)
pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+ objcopy = bb.data.getVar("OBJCOPY", d, True)
+ debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
+ workdir = bb.data.expand("${WORKDIR}", d)
+ sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
- ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+ # We ignore kernel modules, we don't generate debug info files.
+ if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
+ return 0
- if ret:
- bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+ newmode = None
+ if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
+ origmode = os.stat(file)[stat.ST_MODE]
+ newmode = origmode | stat.S_IWRITE | stat.S_IREAD
+ os.chmod(file, newmode)
- if "not stripped" not in result:
- bb.debug(1, "runstrip: skip %s" % file)
- return 0
+ # 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))
- # If the file is in a .debug directory it was already stripped,
- # don't do it again...
- if os.path.dirname(file).endswith(".debug"):
- bb.note("Already ran strip")
- return 0
+ bb.mkdirhier(os.path.dirname(debugfile))
+
+ os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
+
+ # Set the debuglink to have the view of the file path on the target
+ os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
+ if newmode:
+ os.chmod(file, origmode)
+
+ return 0
+
+def splitfile2(debugsrcdir, d):
+ # Function to split a single file, called from split_and_strip_files below
+ #
+ # The debug src information processed in the splitfile2 is further procecessed
+ # and copied to the destination here.
+
+ import commands, stat
+
+ dvar = bb.data.getVar('PKGD', d, True)
+ pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
strip = bb.data.getVar("STRIP", d, True)
objcopy = bb.data.getVar("OBJCOPY", d, True)
+ debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
+ workdir = bb.data.expand("${WORKDIR}", d)
+ sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
+
+ if debugsrcdir:
+ bb.mkdirhier(debugsrcdir)
+
+ processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
+ processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)"
+
+ os.system(processdebugsrc % (sourcefile, workdir, 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)):
+ for d in dirs:
+ dir = os.path.join(root, d)
+ #bb.note("rmdir -p %s" % dir)
+ os.system("rmdir -p %s 2>/dev/null" % dir)
+
+def runstrip(file, d):
+ # Function to strip a single file, called from split_and_strip_files below
+ # A working 'file' (one which works on the target architecture)
+
+ import commands, stat
+
+ pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+ strip = bb.data.getVar("STRIP", d, True)
# Handle kernel modules specifically - .debug directories here are pointless
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -202,21 +258,22 @@ def runstrip(file, d):
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
+ ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+
+ if ret:
+ bb.error("runstrip: 'file %s' failed" % file)
+ return 0
+
extraflags = ""
if ".so" in file and "shared" in result:
extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
elif "shared" in result or "executable" in result:
extraflags = "--remove-section=.comment --remove-section=.note"
- bb.mkdirhier(os.path.join(os.path.dirname(file), ".debug"))
- debugfile=os.path.join(os.path.dirname(file), ".debug", os.path.basename(file))
-
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
bb.debug(1, "runstrip: %s" % stripcmd)
- os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
ret = os.system("%s%s" % (pathprefix, stripcmd))
- os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
if newmode:
os.chmod(file, origmode)
@@ -224,7 +281,7 @@ def runstrip(file, d):
if ret:
bb.error("runstrip: '%s' strip command failed" % stripcmd)
- return 1
+ return 0
#
# Package data handling routines
@@ -333,10 +390,24 @@ python perform_packagecopy () {
}
python split_and_strip_files () {
- import stat
+ import commands, stat, errno
dvar = bb.data.getVar('PKGD', d, True)
+ # We default to Debian style
+ if bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, True) == 'fedora':
+ # Fedora Style debug info
+ debugappend = ".debug"
+ debugdir = ""
+ debuglibdir = "/usr/lib/debug"
+ debugsrcdir = "/usr/src/debug"
+ else:
+ # Debian Style debug info
+ debugappend = ""
+ debugdir = "/.debug"
+ debuglibdir = ""
+ debugsrcdir = ""
+
os.chdir(dvar)
def isexec(path):
@@ -344,16 +415,124 @@ python split_and_strip_files () {
s = os.stat(path)
except (os.error, AttributeError):
return 0
- return (s[stat.ST_MODE] & stat.S_IEXEC)
+ return ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH))
+
+ # Return 0 - not elf, 1 - ELF & not stripped, 2 - ELF & stripped
+ def isELF(path):
+ pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+ ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
+
+ if ret:
+ bb.error("split_and_strip_files: 'file %s' failed" % path)
+ return 0
+
+ # Not stripped
+ if "ELF" in result and "not stripped" in result:
+ return 1
+
+ # Stripped
+ if "ELF" in result:
+ return 2
+
+ return 0;
+
+ #
+ # First lets process debug splitting
+ #
+ if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
+ file_links = {}
- # Figure out which packages we want to process
- if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
- if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
- runstrip(file, d)
+ # Skip debug files, it must be executable, and must be a file (or link)
+ if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file):
+ src = file[len(dvar):]
+ dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+ fpath = dvar + dest
+ # Preserve symlinks in debug area...
+ if os.path.islink(file):
+ target = os.readlink(file)
+ if not os.path.isabs(target):
+ target = os.path.join(os.path.dirname(file), target)
+ if isELF(target):
+ ltarget = os.readlink(file)
+ lpath = os.path.dirname(ltarget)
+ lbase = os.path.basename(ltarget)
+ ftarget = ""
+ if lpath and lpath != ".":
+ ftarget += lpath + debugdir + "/"
+ ftarget += lbase + debugappend
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Symlink %s -> %s" % (fpath, ftarget))
+ os.symlink(ftarget, fpath)
+ continue
+
+ # If the file is elf we need to check it for hard links
+ elf_file = isELF(file)
+ if elf_file:
+ # Preserve hard links in debug area...
+ s = os.stat(file)
+ if s.st_nlink > 1:
+ file_reference = "%d_%d" % (s.st_dev, s.st_ino)
+ if file_reference not in file_links:
+ # If this is new, and already stripped we avoid recording it
+ # as we'll be unable to set the hard link later, because it
+ # won't be split/stripped...
+ if elf_file != 2:
+ file_links[file_reference] = fpath
+ else:
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Link %s -> %s" % (fpath, file_links[file_reference]))
+ os.link(file_links[file_reference], fpath)
+ continue
+
+ if elf_file == 2:
+ bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+ continue
+ # Split and Strip
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Split %s -> %s" % (file, fpath))
+ splitfile(file, fpath, debugsrcdir, d)
+
+ # Process the debugsrcdir if requested...
+ splitfile2(debugsrcdir, d)
+
+ # The above may have generated dangling symlinks
+ for root, dirs, files in os.walk(dvar):
+ for f in files:
+ file = os.path.join(root, f)
+ # We ONLY strip dangling links if they're debug generated!
+ if (debugappend != "" and file.endswith(debugappend)) or (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])):
+ try:
+ s = os.stat(file)
+ except OSError, (err, strerror):
+ if err != errno.ENOENT:
+ raise
+ #bb.note("Remove dangling link %s" % file)
+ os.unlink(file)
+
+ #
+ # End of debug splitting
+ #
+
+ #
+ # Now lets go back over things and strip them
+ #
+ if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
+ for root, dirs, files in os.walk(dvar):
+ for f in files:
+ file = os.path.join(root, f)
+ # if not a debugfile, is executable, is a file, and not a symlink
+ if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file) and not os.path.islink(file):
+ elf_file = isELF(file)
+ if elf_file and elf_file != 2:
+ #bb.note("Strip %s" % file)
+ runstrip(file, d)
+ #
+ # End of strip
+ #
}
python populate_packages () {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index da50fe5..7ec02cd 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -242,9 +242,14 @@ SECTION_${PN}-dev = "devel"
ALLOW_EMPTY_${PN}-dev = "1"
RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
-FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
+DEBIANSTYLE-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
${libdir}/matchbox-panel/.debug"
+
+FEDORASTYLE-dbg = "/usr/lib/debug /usr/src/debug"
+
+FILES_${PN}-dbg = "${@bb.data.getVar(['DEBIANSTYLE-dbg', 'FEDORASTYLE-dbg'][bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, 1) == 'fedora'], d, 1)}"
+
SECTION_${PN}-dbg = "devel"
ALLOW_EMPTY_${PN}-dbg = "1"
RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
index 16571fe..b4863c5 100644
--- a/meta/conf/local.conf.sample
+++ b/meta/conf/local.conf.sample
@@ -106,6 +106,34 @@ USER_CLASSES ?= "image-mklibs image-prelink"
# <build directory>/tmp
#TMPDIR = "${POKYBASE}/build/tmp"
+# The following are used to control options related to debugging.
+#
+# Uncomment this to change the optimization to make debugging easer, at the
+# possible cost of performance.
+# DEBUG_BUILD = "1"
+#
+# Uncomment this to disable the stripping of the installed binaries
+# INHIBIT_PACKAGE_STRIP = "1"
+#
+# Uncomment this to disable the split of the debug information into -dbg files
+# INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+#
+# When splitting debug information, the following controls the results of the
+# file splitting.
+#
+# debian (default):
+# When splitting /bin/foo, the debug information will be:
+# /bin/.debug/foo
+# No referenced sources will be added to the -dbg file
+#
+# fedora:
+# When splitting /bin/foo, the debug information will be:
+# /usr/lib/debug/bin/foo.debug
+# Any source code referenced in the debug symbols will be copied
+# and made available within the /usr/src/debug directory
+#
+PACKAGE_DEBUG_SPLIT_STYLE = 'debian'
+
# Uncomment these to build a package such that you can use gprof to profile it.
# NOTE: This will only work with 'linux' targets, not
# 'linux-uclibc', as uClibc doesn't provide the necessary
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] package.bbclass: Refactor split and strip function
2011-02-11 14:55 [PATCH 0/4] Refactor debug info generation Mark Hatle
2011-02-11 14:55 ` [PATCH 1/4] package.bbclass: Breakout the strip from the populate_packages Mark Hatle
2011-02-11 14:56 ` [PATCH 2/4] Revise stripping and splitting of debug information Mark Hatle
@ 2011-02-11 14:56 ` Mark Hatle
2011-02-11 14:56 ` [PATCH 4/4] recipes: pre/post actions Mark Hatle
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2011-02-11 14:56 UTC (permalink / raw)
To: poky
Refactor the function to eliminate additional interations/walks of the
filesystem..
Elimiate multiple runs of the external 'file' command as well.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package.bbclass | 242 +++++++++++++++++++++++++-----------------
1 files changed, 144 insertions(+), 98 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 94dbdcc..dd25df1 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -184,7 +184,7 @@ def splitfile(file, debugfile, debugsrcdir, d):
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
- return 0
+ return 1
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
@@ -239,9 +239,14 @@ def splitfile2(debugsrcdir, d):
#bb.note("rmdir -p %s" % dir)
os.system("rmdir -p %s 2>/dev/null" % dir)
-def runstrip(file, d):
+def runstrip(file, elftype, d):
# Function to strip a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
+ #
+ # The elftype is a bit pattern (explained in split_and_strip_files) to tell
+ # us what type of file we're processing...
+ # 4 - executable
+ # 8 - shared library
import commands, stat
@@ -258,16 +263,12 @@ def runstrip(file, d):
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
- ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
-
- if ret:
- bb.error("runstrip: 'file %s' failed" % file)
- return 0
-
extraflags = ""
- if ".so" in file and "shared" in result:
+ # .so and shared library
+ if ".so" in file and elftype & 8:
extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
- elif "shared" in result or "executable" in result:
+ # shared or executable:
+ elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
@@ -410,109 +411,158 @@ python split_and_strip_files () {
os.chdir(dvar)
- def isexec(path):
- try:
- s = os.stat(path)
- except (os.error, AttributeError):
- return 0
- return ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH))
-
- # Return 0 - not elf, 1 - ELF & not stripped, 2 - ELF & stripped
+ # Return type (bits):
+ # 0 - not elf
+ # 1 - ELF
+ # 2 - stripped
+ # 4 - executable
+ # 8 - shared library
def isELF(path):
+ type = 0
pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
if ret:
bb.error("split_and_strip_files: 'file %s' failed" % path)
- return 0
+ return type
# Not stripped
- if "ELF" in result and "not stripped" in result:
- return 1
-
- # Stripped
if "ELF" in result:
- return 2
+ type |= 1
+ if "not stripped" not in result:
+ type |= 2
+ if "executable" in result:
+ type |= 4
+ if "shared" in result:
+ type |= 8
+ return type
- return 0;
#
- # First lets process debug splitting
+ # First lets figure out all of the files we may have to process ... do this only once!
#
- if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
- file_links = {}
-
+ file_list = {}
+ file_links = {}
+ if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1') and \
+ (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
- # Skip debug files, it must be executable, and must be a file (or link)
- if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file):
- src = file[len(dvar):]
- dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
- fpath = dvar + dest
- # Preserve symlinks in debug area...
- if os.path.islink(file):
- target = os.readlink(file)
- if not os.path.isabs(target):
- target = os.path.join(os.path.dirname(file), target)
- if isELF(target):
- ltarget = os.readlink(file)
- lpath = os.path.dirname(ltarget)
- lbase = os.path.basename(ltarget)
- ftarget = ""
- if lpath and lpath != ".":
- ftarget += lpath + debugdir + "/"
- ftarget += lbase + debugappend
- bb.mkdirhier(os.path.dirname(fpath))
- #bb.note("Symlink %s -> %s" % (fpath, ftarget))
- os.symlink(ftarget, fpath)
- continue
-
- # If the file is elf we need to check it for hard links
- elf_file = isELF(file)
- if elf_file:
- # Preserve hard links in debug area...
+ # Only process files (and symlinks)... Skip files that are obviously debug files
+ if not (debugappend != "" and file.endswith(debugappend)) and \
+ not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and \
+ os.path.isfile(file):
+ try:
s = os.stat(file)
- if s.st_nlink > 1:
- file_reference = "%d_%d" % (s.st_dev, s.st_ino)
- if file_reference not in file_links:
- # If this is new, and already stripped we avoid recording it
- # as we'll be unable to set the hard link later, because it
- # won't be split/stripped...
- if elf_file != 2:
- file_links[file_reference] = fpath
+ except OSError, (err, strerror):
+ if err != errno.ENOENT:
+ raise
+ # Skip broken symlinks
+ continue
+ # Is the item excutable? Then we need to process it.
+ if (s[stat.ST_MODE] & stat.S_IXUSR) or \
+ (s[stat.ST_MODE] & stat.S_IXGRP) or \
+ (s[stat.ST_MODE] & stat.S_IXOTH):
+ # If it's a symlink, and points to an ELF file, we capture the readlink target
+ if os.path.islink(file):
+ target = os.readlink(file)
+ if not os.path.isabs(target):
+ ltarget = os.path.join(os.path.dirname(file), target)
else:
- bb.mkdirhier(os.path.dirname(fpath))
- #bb.note("Link %s -> %s" % (fpath, file_links[file_reference]))
- os.link(file_links[file_reference], fpath)
- continue
+ ltarget = target
- if elf_file == 2:
- bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+ if isELF(ltarget):
+ #bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
+ file_list[file] = "sym: " + target
continue
+ # It's a file (or hardlink), not a link
+ # ...but is it ELF, and is it already stripped?
+ elf_file = isELF(file)
+ if elf_file & 1:
+ # Check if it's a hard link to something else
+ if s.st_nlink > 1:
+ file_reference = "%d_%d" % (s.st_dev, s.st_ino)
+ # Hard link to something else
+ file_list[file] = "hard: " + file_reference
+ continue
- # Split and Strip
- bb.mkdirhier(os.path.dirname(fpath))
- #bb.note("Split %s -> %s" % (file, fpath))
- splitfile(file, fpath, debugsrcdir, d)
+ file_list[file] = "ELF: %d" % elf_file
- # Process the debugsrcdir if requested...
- splitfile2(debugsrcdir, d)
- # The above may have generated dangling symlinks
- for root, dirs, files in os.walk(dvar):
- for f in files:
- file = os.path.join(root, f)
- # We ONLY strip dangling links if they're debug generated!
- if (debugappend != "" and file.endswith(debugappend)) or (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])):
- try:
- s = os.stat(file)
- except OSError, (err, strerror):
- if err != errno.ENOENT:
- raise
- #bb.note("Remove dangling link %s" % file)
- os.unlink(file)
+ #
+ # First lets process debug splitting
+ #
+ if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
+ for file in file_list:
+ src = file[len(dvar):]
+ dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+ fpath = dvar + dest
+ # Preserve symlinks in debug area...
+ if file_list[file].startswith("sym: "):
+ ltarget = file_list[file][5:]
+ lpath = os.path.dirname(ltarget)
+ lbase = os.path.basename(ltarget)
+ ftarget = ""
+ if lpath and lpath != ".":
+ ftarget += lpath + debugdir + "/"
+ ftarget += lbase + debugappend
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Symlink %s -> %s" % (fpath, ftarget))
+ os.symlink(ftarget, fpath)
+ continue
+
+ # Preserve hard links in debug area...
+ file_reference = ""
+ if file_list[file].startswith("hard: "):
+ file_reference = file_list[file][6:]
+ if file_reference not in file_links:
+ # If this is a new file, add it as a reference, and
+ # update it's type, so we can fall through and split
+ file_list[file] = "ELF: %d" % (isELF(file))
+ else:
+ target = file_links[file_reference][len(dvar):]
+ ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Link %s -> %s" % (fpath, ftarget))
+ os.link(ftarget, fpath)
+ continue
+ # It's ELF...
+ if file_list[file].startswith("ELF: "):
+ elf_file = int(file_list[file][5:])
+ if elf_file & 2:
+ bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+ continue
+
+ # Split the file...
+ bb.mkdirhier(os.path.dirname(fpath))
+ #bb.note("Split %s -> %s" % (file, fpath))
+ # Only store off the hard link reference if we successfully split!
+ if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
+ file_links[file_reference] = file
+
+ # The above may have generated dangling symlinks, remove them!
+ # Dangling symlinks are a result of something NOT being split, such as a stripped binary.
+ # This should be a rare occurance, but we want to clean up anyway.
+ for file in file_list:
+ if file_list[file].startswith("sym: "):
+ src = file[len(dvar):]
+ dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+ fpath = dvar + dest
+ try:
+ s = os.stat(fpath)
+ except OSError, (err, strerror):
+ if err != errno.ENOENT:
+ raise
+ #bb.note("Remove dangling link %s -> %s" % (fpath, os.readlink(fpath)))
+ os.unlink(fpath)
+ # This could leave an empty debug directory laying around
+ # take care of the obvious case...
+ os.system("rmdir %s 2>/dev/null" % os.path.dirname(fpath))
+
+ # Process the debugsrcdir if requested...
+ # This copies and places the referenced sources for later debugging...
+ splitfile2(debugsrcdir, d)
#
# End of debug splitting
#
@@ -521,15 +571,11 @@ python split_and_strip_files () {
# Now lets go back over things and strip them
#
if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
- for root, dirs, files in os.walk(dvar):
- for f in files:
- file = os.path.join(root, f)
- # if not a debugfile, is executable, is a file, and not a symlink
- if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file) and not os.path.islink(file):
- elf_file = isELF(file)
- if elf_file and elf_file != 2:
- #bb.note("Strip %s" % file)
- runstrip(file, d)
+ for file in file_list:
+ if file_list[file].startswith("ELF: "):
+ elf_file = int(file_list[file][5:])
+ #bb.note("Strip %s" % file)
+ runstrip(file, elf_file, d)
#
# End of strip
#
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] recipes: pre/post actions
2011-02-11 14:55 [PATCH 0/4] Refactor debug info generation Mark Hatle
` (2 preceding siblings ...)
2011-02-11 14:56 ` [PATCH 3/4] package.bbclass: Refactor split and strip function Mark Hatle
@ 2011-02-11 14:56 ` Mark Hatle
3 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2011-02-11 14:56 UTC (permalink / raw)
To: poky
A number of the recipes did not properly label their pre and post
actions, causing the actions to occur in all split packages. This
was corrected by defaulting to _${PN} in most cases.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-bsp/hostap/hostap-conf_1.0.bb | 4 ++--
meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 4 ++--
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb | 4 ++--
.../libnss-mdns/libnss-mdns_0.10.bb | 4 ++--
.../ppp-dialin/ppp-dialin_0.1.bb | 4 ++--
.../recipes-core/base-passwd/base-passwd_3.5.22.bb | 2 +-
meta/recipes-core/dropbear/dropbear.inc | 4 ++--
.../sgml-common/sgml-common_0.6.3.bb | 4 ++--
meta/recipes-extended/bash/bash.inc | 2 +-
meta/recipes-extended/bash/bash_3.2.48.bb | 2 +-
meta/recipes-extended/sudo/sudo.inc | 2 +-
.../ttf-fonts/liberation-fonts_1.04.bb | 2 +-
.../ttf-fonts/liberation-fonts_1.06.bb | 2 +-
.../ttf-fonts/ttf-bitstream-vera_1.10.bb | 2 +-
.../update-modules/update-modules_1.0.bb | 2 +-
15 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
index fa29470..de72b76 100644
--- a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
@@ -19,13 +19,13 @@ do_install() {
install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 1
fi
update-modules || true
}
-pkg_postrm () {
+pkg_postrm_${PN} () {
update-modules || true
}
diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
index 6d08084..4cefdb7 100644
--- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
+++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -28,13 +28,13 @@ do_install() {
install -m 0755 src/lrz src/lsz ${D}${bindir}/
}
-pkg_postinst() {
+pkg_postinst_${PN}() {
for util in rz rx rb sz sx sb; do
update-alternatives --install ${bindir}/$util $util lrz 100
done
}
-pkg_postrm() {
+pkg_postrm_${PN}() {
for util in rz rx rb sz sx sb; do
update-alternatives --remove $util ${bindir}/lrz
done
diff --git a/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb b/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
index a24d004..1c25e02 100644
--- a/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
+++ b/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
@@ -15,13 +15,13 @@ do_install() {
install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 1
fi
update-modules || true
}
-pkg_postrm () {
+pkg_postrm_${PN} () {
update-modules || true
}
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 4c94d2a..b04b20a 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -25,14 +25,14 @@ DEBIANNAME_${PN} = "libnss-mdns"
EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
# TODO: pattern based configuration update
-pkg_postinst () {
+pkg_postinst_${PN} () {
cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
mv /tmp/nsswitch.conf /etc/nsswitch.conf
}
}
-pkg_prerm () {
+pkg_prerm_${PN} () {
cat /etc/nsswitch.conf | grep "hosts:\s*files dns mdns4$" > /dev/null && {
cat /etc/nsswitch.conf | sed 's/\(hosts:\s*files dns\) mdns4*/\1/' > /tmp/nsswitch.conf
mv /tmp/nsswitch.conf /etc/nsswitch.conf
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
index aa3684a..f57597d 100644
--- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
+++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb
@@ -20,7 +20,7 @@ do_install() {
PACKAGE_ARCH = "all"
-pkg_postinst() {
+pkg_postinst_${PN} () {
if test "x$D" != "x"; then
exit 1
else
@@ -28,7 +28,7 @@ else
fi
}
-pkg_postrm() {
+pkg_postrm_${PN} () {
if test "x$D" != "x"; then
exit 1
else
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index b826367..aed8491 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -40,7 +40,7 @@ do_install_append_openmn() {
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
set -e
if [ ! -e $D${sysconfdir}/passwd ] ; then
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index dd2f0c5..ab7719c 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -63,12 +63,12 @@ do_install() {
chmod 755 ${D}${sysconfdir}/init.d/dropbear
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
update-alternatives --install ${bindir}/scp scp ${sbindir}/dropbearmulti 20
update-alternatives --install ${bindir}/ssh ssh ${sbindir}/dropbearmulti 20
}
-pkg_postrm_append () {
+pkg_postrm_append_${PN} () {
if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
fi
diff --git a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
index 92014a8..63e0acd 100644
--- a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
+++ b/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
@@ -31,7 +31,7 @@ do_compile_append() {
FILES_sgml-common_append = " ${datadir}/sgml"
-pkg_postinst() {
+pkg_postinst_${PN}() {
install-catalog \
--add ${sysconfdir}/sgml/sgml-ent.cat \
${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
@@ -41,7 +41,7 @@ pkg_postinst() {
${sysconfdir}/sgml/sgml-ent.cat
}
-pkg_postrm() {
+pkg_postrm_${PN}() {
install-catalog \
--remove ${sysconfdir}/sgml/sgml-ent.cat \
${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index a87b87f..ecbd75d 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -27,7 +27,7 @@ do_configure () {
oe_runconf
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
touch $D${sysconfdir}/shells
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
index e5a3e36..0912ad6 100644
--- a/meta/recipes-extended/bash/bash_3.2.48.bb
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -28,7 +28,7 @@ do_configure () {
oe_runconf
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
touch $D${sysconfdir}/shells
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
index 1407bf1..6a04a9c 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -23,7 +23,7 @@ do_configure_prepend () {
fi
}
-pkg_postinst() {
+pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
exit 1
fi
diff --git a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb b/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
index 12d9d86..c50d6eb 100644
--- a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
+++ b/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
@@ -32,7 +32,7 @@ do_install () {
install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
#!/bin/sh
fc-cache
}
diff --git a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb b/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb
index 887536a..f6bf0ce 100644
--- a/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb
+++ b/meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb
@@ -33,7 +33,7 @@ do_install () {
install -m 0644 License.txt ${D}${datadir}/doc/${PN}/
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
#!/bin/sh
fc-cache
}
diff --git a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
index b9a75a7..bdeb4c1 100644
--- a/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
+++ b/meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb
@@ -31,7 +31,7 @@ do_install () {
done
}
-pkg_postinst () {
+pkg_postinst_${PN} () {
#!/bin/sh
fc-cache
}
diff --git a/meta/recipes-kernel/update-modules/update-modules_1.0.bb b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
index a473bb5..a8ebbda 100644
--- a/meta/recipes-kernel/update-modules/update-modules_1.0.bb
+++ b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
@@ -10,7 +10,7 @@ PR = "r8"
SRC_URI = "file://update-modules \
file://COPYING.GPL"
-pkg_postinst() {
+pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
exit 1
fi
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-11 14:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 14:55 [PATCH 0/4] Refactor debug info generation Mark Hatle
2011-02-11 14:55 ` [PATCH 1/4] package.bbclass: Breakout the strip from the populate_packages Mark Hatle
2011-02-11 14:56 ` [PATCH 2/4] Revise stripping and splitting of debug information Mark Hatle
2011-02-11 14:56 ` [PATCH 3/4] package.bbclass: Refactor split and strip function Mark Hatle
2011-02-11 14:56 ` [PATCH 4/4] recipes: pre/post actions 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.