classes/meta-toolchain: Remove pkgmaps from use using pkgdata to provide all function...
authorRichard Purdie <rpurdie@rpsys.net>
Sat, 1 Dec 2007 19:03:27 +0000 (19:03 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Sat, 1 Dec 2007 19:03:27 +0000 (19:03 +0000)
classes/debian.bbclass
classes/package.bbclass
packages/meta/meta-toolchain.bb

index a38f10d..dd0789a 100644 (file)
@@ -1,5 +1,3 @@
-STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian"
-
 # Debian package renaming only occurs when a package is built
 # We therefore have to make sure we build all runtime packages
 # before building the current package to make the packages runtime
index 1d661bc..67aeb33 100644 (file)
@@ -186,42 +186,15 @@ def runstrip(file, d):
 # Package data handling routines
 #
 
-STAGING_PKGMAPS_DIR ?= "${STAGING_DIR}/pkgmaps"
-
-def add_package_mapping (pkg, new_name, d):
-       import bb, os
-
-       def encode(str):
-               import codecs
-               c = codecs.getencoder("string_escape")
-               return c(str)[0]
-
-       pmap_dir = bb.data.getVar('STAGING_PKGMAPS_DIR', d, 1)
-
-       bb.mkdirhier(pmap_dir)
-
-       data_file = os.path.join(pmap_dir, pkg)
-
-       f = open(data_file, 'w')
-       f.write("%s\n" % encode(new_name))
-       f.close()
-
 def get_package_mapping (pkg, d):
        import bb, os
 
-       def decode(str):
-               import codecs
-               c = codecs.getdecoder("string_escape")
-               return c(str)[0]
+       data = read_subpkgdata(pkg, d)
+       key = "PKG_%s" % pkg
 
-       data_file = bb.data.expand("${STAGING_PKGMAPS_DIR}/%s" % pkg, d)
+       if key in data:
+               return data[key]
 
-       if os.access(data_file, os.R_OK):
-               f = file(data_file, 'r')
-               lines = f.readlines()
-               f.close()
-               for l in lines:
-                       return decode(l).strip()
        return pkg
 
 def runtime_mapping_rename (varname, d):
@@ -255,9 +228,6 @@ python package_do_split_locales() {
                return
 
        packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
-       if not packages:
-               bb.debug(1, "no packages to build; not splitting locales")
-               return
 
        datadir = bb.data.getVar('datadir', d, 1)
        if not datadir:
@@ -510,8 +480,6 @@ python populate_packages () {
                pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
                if pkgname is None:
                        bb.data.setVar('PKG_%s' % pkg, pkg, d)
-               else:
-                       add_package_mapping(pkg, pkgname, d)
 
        dangling_links = {}
        pkg_files = {}
index 991d079..8f36600 100644 (file)
@@ -62,11 +62,10 @@ do_populate_sdk() {
        mv ${SDK_OUTPUT}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status-host
        rm -Rf ${SDK_OUTPUT}/usr/lib
 
-       # extract and store ipks, pkgdata, pkgmaps and shlibs data
+       # extract and store ipks, pkgdata and shlibs data
        target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '`
        mkdir -p ${SDK_OUTPUT}/${prefix}/ipk/
        mkdir -p ${SDK_OUTPUT}/${prefix}/pkgdata/runtime/
-       mkdir -p ${SDK_OUTPUT}/${prefix}/pkgmaps/debian/
        mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/shlibs/
        for pkg in $target_pkgs ; do
                for arch in $revipkgarchs; do
@@ -84,9 +83,6 @@ do_populate_sdk() {
                                        if [ -e ${STAGING_DIR}/pkgdata/$pkg_subdir/runtime/$subpkg.packaged ];then
                                                cp ${STAGING_DIR}/pkgdata/$pkg_subdir/runtime/$subpkg.packaged ${SDK_OUTPUT}/${prefix}/pkgdata/$pkg_subdir/runtime/
                                        fi
-                                       if [ -e ${STAGING_DIR}/pkgmaps/debian/$subpkg ]; then
-                                               cp ${STAGING_DIR}/pkgmaps/debian/$subpkg ${SDK_OUTPUT}/${prefix}/pkgmaps/debian/
-                                       fi
                                        if [ -e ${STAGING_DIR_TARGET}/shlibs/$subpkg.list ]; then
                                                cp ${STAGING_DIR_TARGET}/shlibs/$subpkg.* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/shlibs/
                                        fi