On 7/16/06, Phil Blundell <[EMAIL PROTECTED]> wrote:
The easiest fix would be to make a new variable PACKAGESTRIPFUNCS (cf
PACKAGEFUNCS) and arrange for populate_packages() to invoke all the
functions named therein at an appropriate point: that'd probably be just
before the "del localdata" at about line 230 of package.bbclass.
I can do that easily without adding the RUNSTRIP part of
populate_packages() to this new PACKAGESTRIPFUNCS, but ideally that
should be in there too, right?

Can you verify that the patch below should indeed do the trick and not
break anything else?  I'll open a bug in the tracker for this.

Regards, Jan

--- org.openembedded.dev/classes/package.bbclass.orig   2006-07-17
07:55:54.000000000 +0200
+++ org.openembedded.dev/classes/package.bbclass        2006-07-17
07:53:54.000000000 +0200
@@ -199,10 +199,12 @@
               oenote "runstrip: skip $1"
       fi
       return $st
}

+PACKAGESTRIPFUNCS = ""
+
python populate_packages () {
       import glob, stat, errno, re

       workdir = bb.data.getVar('WORKDIR', d, 1)
       if not workdir:
@@ -302,10 +304,13 @@
                       from bb import build
                       # strip
                       bb.data.setVar('RUNSTRIP', '\tlocal
st\n\tst=0\n%s\treturn $st' % stripfunc, localdata)
                       bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata)
                       bb.build.exec_func('RUNSTRIP', localdata)
+               if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
+                       for f in (bb.data.getVar('PACKAGESTRIPFUNCS',
d, 1) or '').split():
+                               bb.build.exec_func(f, localdata)
               del localdata
       os.chdir(workdir)

       unshipped = []
       for root, dirs, files in os.walk(dvar):
--- org.openembedded.dev/classes/module_strip.bbclass.orig
2006-07-17 07:54:32.000000000 +0200
+++ org.openembedded.dev/classes/module_strip.bbclass   2006-07-17
08:00:14.000000000 +0200
@@ -1,7 +1,9 @@
#DEPENDS_append = " module-strip"

+PACKAGESTRIPFUNCS += "do_strip_modules"
+
do_strip_modules () {
       for p in ${PACKAGES}; do
               if test -e ${WORKDIR}/install/$p/lib/modules; then
                       modules="`find
${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`"
                       if [ -n "$modules" ]; then
@@ -10,9 +12,6 @@
                       fi
               fi
       done
}

-python do_package_append () {
-       if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
-               bb.build.exec_func('do_strip_modules', d)
-}
+EXPORT_FUNCTIONS do_strip_modules
_______________________________________________
Oe mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/oe

Reply via email to