Files
poky/meta/recipes-core/eglibc/eglibc-options.inc
Nitin A Kamble 6c73e458da eglibc packaging: locale packaging configuration
The PACKAGE_NO_GCONV var manipulations ware happening in the
eglibc-options.inc file, and the eglibc-locale recipe do not
see it. Moving that into the libc-package.bbclass which is
common to eglibc & eglibc-locale recipes.

This fixes bug: [YOCTO #2089]

This avoids this error for poky-tiny
NOTE: package eglibc-locale-2.13-r19: task do_populate_sysroot: Started
ERROR: Error executing a python function in
/opt/poky.git/meta/recipes-core/eglibc/eglibc-locale_2.13.bb:
OSError: [Errno 2] No such file or directory:
'/home/rchatre/concordia/dev/ccd-distro-work/tmp/work/core2-poky-linux/eglibc-locale-2.13-r19/package/usr/lib/gconv'

ERROR: The stack trace of python calls that resulted in this exception/failure
was:
ERROR:   File "package_do_split_gconvs", line 264, in <module>
ERROR:·
ERROR:   File "package_do_split_gconvs", line 45, in package_do_split_gconvs
ERROR:·
ERROR:   File "package.bbclass", line 30, in do_split_packages
ERROR:·
ERROR: The code that was being executed was:
ERROR:      0260:»------»-------bb.note("generation of binary locales disabled.
this may break i18n!")
ERROR:      0261:
ERROR:      0262:
ERROR:      0263:
ERROR:  *** 0264:package_do_split_gconvs(d)
ERROR:      0265:
ERROR: (file: 'package_do_split_gconvs', lineno: 264, function: <module>)
ERROR:      0041:»------»-------»-------d.setVar('RPROVIDES_%s' % pkg,
pkg.replace(bpn, 'glibc'))
ERROR:      0042:
ERROR:      0043:»------do_split_packages(d, gconv_libdir,
file_regex='^(.*)\.so$', output_pattern=bpn+'-gconv-%s', \
ERROR:      0044:»------»-------description='gconv module for character set
%s', hook=calc_gconv_deps, \
ERROR:  *** 0045:»------»-------extra_depends=bpn+'-gconv')
ERROR:      0046:
ERROR:      0047:»------def calc_charmap_deps(fn, pkg, file_regex,
output_pattern, group):
ERROR:      0048:»------»-------deps = []
ERROR:      0049:»------»-------f = open(fn, "r")
ERROR: (file: 'package_do_split_gconvs', lineno: 45, function:
package_do_split_gconvs)
ERROR: Function failed: package_do_split_gconvs
ERROR: Logfile of failure stored in:
/home/rchatre/concordia/dev/ccd-distro-work/tmp/work/core2-poky-linux/eglibc-locale-2.13-r19/temp/log.do_package.31042
NOTE: package eglibc-locale-2.13-r19: task do_package: Failed
ERROR: Task 552 (/opt/poky.git/meta/recipes-core/eglibc/eglibc-locale_2.13.bb,
do_package) failed with exit code '1'

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04 17:17:52 +01:00

130 lines
6.8 KiB
PHP

def eglibc_cfg(feature, features, tokens, cnf):
if type(tokens) == type(""):
tokens = [tokens]
if type(features) == type([]) and feature in features:
cnf.extend([token + ' = y' for token in tokens])
else:
for token in tokens:
cnf.extend([token + ' = n'])
if token == 'OPTION_EGLIBC_NSSWITCH':
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"])
cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"])
# arrange the dependencies among eglibc configuable options according to file option-groups.def from eglibc source code
def distro_features_check_deps(distro_features):
new_dep = True
while new_dep:
new_dep = False
if 'ipv6' in distro_features and 'ipv4' not in distro_features:
new_dep = True
distro_features.extend(['ipv4'])
if 'ipv4' in distro_features and 'libc-nsswitch' not in distro_features:
new_dep = True
distro_features.extend(['libc-nsswitch'])
if 'libc-cxx-tests' in distro_features:
if 'libc-posix-wchar-io' not in distro_features:
new_dep = True
distro_features.extend(['libc-posix-wchar-io'])
if 'libc-libm' not in distro_features:
new_dep = True
distro_features.extend(['libc-libm'])
if 'libc-catgets' in distro_features and 'libc-locale-code' not in distro_features:
new_dep = True
distro_features.extend(['libc-locale-code'])
if 'libc-crypt-ufc' in distro_features and 'libc-crypt' not in distro_features:
new_dep = True
distro_features.extend(['libc-crypt'])
if 'libc-getlogin' in distro_features and 'libc-utmp' not in distro_features:
new_dep = True
distro_features.extend(['libc-utmp'])
if 'libc-inet-anl' in distro_features and 'ipv4' not in distro_features:
new_dep = True
distro_features.extend(['ipv4'])
if 'libc-locale-code' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
new_dep = True
distro_features.extend(['libc-posix-clang-wchar'])
if 'libc-nis' in distro_features:
if 'ipv4' not in distro_features:
new_dep = True
distro_features.extend(['ipv4'])
if 'libc-sunrpc' not in distro_features:
new_dep = True
distro_features.extend(['libc-sunrpc'])
if 'libc-rcmd' in distro_features and 'ipv4' not in distro_features:
new_dep = True
distro_features.extend(['ipv4'])
if 'libc-sunrpc' in distro_features and 'ipv4' not in distro_features:
new_dep = True
distro_features.extend(['ipv4'])
if 'libc-utmpx' in distro_features and 'libc-utmp' not in distro_features:
new_dep = True
distro_features.extend(['libc-utmp'])
if 'libc-posix-regexp-glibc' in distro_features and 'libc-posix-regexp' not in distro_features:
new_dep = True
distro_features.extend(['libc-posix-regexp'])
if 'libc-posix-wchar-io' in distro_features and 'libc-posix-clang-wchar' not in distro_features:
new_dep = True
distro_features.extend(['libc-posix-clang-wchar'])
# Map distro features to eglibc options settings
def features_to_eglibc_settings(d):
cnf = ([])
distro_features = (d.getVar('DISTRO_FEATURES', True) or '').split()
distro_features_check_deps(distro_features)
eglibc_cfg('ipv6', distro_features, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
eglibc_cfg('libc-backtrace', distro_features, 'OPTION_EGLIBC_BACKTRACE', cnf)
eglibc_cfg('libc-big-macros', distro_features, 'OPTION_EGLIBC_BIG_MACROS', cnf)
eglibc_cfg('libc-bsd', distro_features, 'OPTION_EGLIBC_BSD', cnf)
eglibc_cfg('libc-cxx-tests', distro_features, 'OPTION_EGLIBC_CXX_TESTS', cnf)
eglibc_cfg('libc-catgets', distro_features, 'OPTION_EGLIBC_CATGETS', cnf)
eglibc_cfg('libc-charsets', distro_features, 'OPTION_EGLIBC_CHARSETS', cnf)
eglibc_cfg('libc-crypt', distro_features, 'OPTION_EGLIBC_CRYPT', cnf)
eglibc_cfg('libc-crypt-ufc', distro_features, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
eglibc_cfg('libc-db-aliases', distro_features, 'OPTION_EGLIBC_DB_ALIASES', cnf)
eglibc_cfg('libc-envz', distro_features, 'OPTION_EGLIBC_ENVZ', cnf)
eglibc_cfg('libc-fcvt', distro_features, 'OPTION_EGLIBC_FCVT', cnf)
eglibc_cfg('libc-fmtmsg', distro_features, 'OPTION_EGLIBC_FMTMSG', cnf)
eglibc_cfg('libc-fstab', distro_features, 'OPTION_EGLIBC_FSTAB', cnf)
eglibc_cfg('libc-ftraverse', distro_features, 'OPTION_EGLIBC_FTRAVERSE', cnf)
eglibc_cfg('libc-getlogin', distro_features, 'OPTION_EGLIBC_GETLOGIN', cnf)
eglibc_cfg('libc-idn', distro_features, 'OPTION_EGLIBC_IDN', cnf)
eglibc_cfg('ipv4', distro_features, 'OPTION_EGLIBC_INET', cnf)
eglibc_cfg('libc-inet-anl', distro_features, 'OPTION_EGLIBC_INET_ANL', cnf)
eglibc_cfg('libc-libm', distro_features, 'OPTION_EGLIBC_LIBM', cnf)
eglibc_cfg('libc-libm-big', distro_features, 'OPTION_EGLIBC_LIBM_BIG', cnf)
eglibc_cfg('libc-locales', distro_features, 'OPTION_EGLIBC_LOCALES', cnf)
eglibc_cfg('libc-locale-code', distro_features, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
eglibc_cfg('libc-memusage', distro_features, 'OPTION_EGLIBC_MEMUSAGE', cnf)
eglibc_cfg('libc-nis', distro_features, 'OPTION_EGLIBC_NIS', cnf)
eglibc_cfg('libc-nsswitch', distro_features, 'OPTION_EGLIBC_NSSWITCH', cnf)
eglibc_cfg('libc-rcmd', distro_features, 'OPTION_EGLIBC_RCMD', cnf)
eglibc_cfg('libc-rtld-debug', distro_features, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
eglibc_cfg('libc-spawn', distro_features, 'OPTION_EGLIBC_SPAWN', cnf)
eglibc_cfg('libc-streams', distro_features, 'OPTION_EGLIBC_STREAMS', cnf)
eglibc_cfg('libc-sunrpc', distro_features, 'OPTION_EGLIBC_SUNRPC', cnf)
eglibc_cfg('libc-utmp', distro_features, 'OPTION_EGLIBC_UTMP', cnf)
eglibc_cfg('libc-utmpx', distro_features, 'OPTION_EGLIBC_UTMPX', cnf)
eglibc_cfg('libc-wordexp', distro_features, 'OPTION_EGLIBC_WORDEXP', cnf)
eglibc_cfg('libc-posix-clang-wchar', distro_features, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
eglibc_cfg('libc-posix-regexp', distro_features, 'OPTION_POSIX_REGEXP', cnf)
eglibc_cfg('libc-posix-regexp-glibc', distro_features, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
eglibc_cfg('libc-posix-wchar-io', distro_features, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
return "\n".join(cnf)