diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-12-01 19:03:27 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-12-01 19:03:27 +0000 |
commit | 4bdcce051cee2d1c9c83f77c88a6f68726cedfe0 (patch) | |
tree | f173774f3137d5b83b6536053c39251b89bd81a8 /classes/package.bbclass | |
parent | fa6001effc161c8d8ff17d5d107b13d7cb3ee05c (diff) |
classes/meta-toolchain: Remove pkgmaps from use using pkgdata to provide all functionality in a multimachine safe way instead (from poky).
Diffstat (limited to 'classes/package.bbclass')
-rw-r--r-- | classes/package.bbclass | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass index 1d661bcfe7..67aeb33a13 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -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 = {} |