eliminate local do_split in favour of version in package.oeclass - patch courtesy...
authorMichael Lauer <mickey@vanille-media.de>
Sat, 1 May 2004 11:18:04 +0000 (11:18 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sat, 1 May 2004 11:18:04 +0000 (11:18 +0000)
BKrev: 4093876cRv4MY7SX-FsyKyGvcNL3tA

glibc/glibc_cvs.oe

index a64d35b..efb1ec9 100644 (file)
@@ -190,37 +190,6 @@ do_install() {
 
 python package_do_split_gconvs () {
        import os
-       def do_split(root, pattern, format, description, postinst):
-               dvar = oe.data.getVar('D', d, 1)
-               if not dvar:
-                       oe.error("D not defined")
-                       return
-
-               packages = oe.data.getVar('PACKAGES', d, 1).split()
-               if not packages:
-                       # might be glibc-initial
-                       return
-
-               if postinst:
-                       postinst = '#!/bin/sh\n' + postinst
-               objs = os.listdir(dvar + root)
-               mainpkg = oe.data.getVar('PKG_' + packages[0], d) or packages[0]
-               for o in objs:
-                       import re
-                       m = re.match(pattern, o)
-                       if not m:
-                               continue
-                       on = m.group(1).lower().replace('_', '+').replace('@', '+')
-                       pkg = format % on
-                       packages.append(pkg)
-                       oe.data.setVar('FILES_' + pkg, os.path.join(root, o), d)
-                       oe.data.setVar('RDEPENDS_' + pkg, mainpkg, d)
-                       oe.data.setVar('DESCRIPTION_' + pkg, description % on, d)
-                       if postinst:
-                               oe.data.setVar('pkg_postinst_' + pkg, postinst, d)
-
-               oe.data.setVar('PACKAGES', ' '.join(packages), d)
-
        if (oe.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'):
                oe.note("package requested not splitting gconvs")
                return
@@ -232,7 +201,7 @@ python package_do_split_gconvs () {
 
        gconv_libdir = os.path.join(libdir, "gconv")
 
-       do_split(gconv_libdir, '^(.*)\.so$', 'glibc-gconv-%s', 'gconv module for character set %s', None)
+       do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s')
 
        oe.data.setVar('PACKAGES', oe.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
 }