summaryrefslogtreecommitdiffstats
path: root/meta/classes/libc-package.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* libc-package.bbclass: Add armeb architecture to locale_arch_optionsFathi Boudra2013-08-061-0/+1
| | | | | | | | | | | | | Fix gconv build failure on ARM big-endian architecture: ERROR: locale_arch_options not found for target_arch=armeb ERROR: Function failed: unknown arch:armeb for locale_arch_options (From OE-Core rev: a714cdf431635c4a344d3a135a71061e5629eed8) Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class/lib: Fix up various file access methodsRichard Purdie2013-05-091-3/+3
| | | | | | | | | | | | | | There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases (From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: Drop bogus replacement operationRichard Purdie2012-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | The names used to generate the binary-localdata packages need to match the location the dependencies are added. In one case the dash replacement is made, in the other it is not leading to packages which cannot be installed: eglibc-binary-localedata-af-za.iso88591 is needed by locale-base-af-za.iso-8859-1-2.16-r22.i586 eglibc-binary-localedata-cs-cz.iso88592 is needed by locale-base-cs-cz.iso-8859-2-2.16-r22.i586 eglibc-binary-localedata-ru-ru.koi8r is needed by locale-base-ru-ru.koi8-r-2.16-r22.i586 eglibc-binary-localedata-pl-pl.iso88592 is needed by locale-base-pl-pl.iso-8859-2-2.16-r22.i586 eglibc-binary-localedata-hu-hu.iso88592 is needed by locale-base-hu-hu.iso-8859-2-2.16-r22.i586 eglibc-binary-localedata-de-at+euro.iso885915 is needed by locale-base-de-at+euro.iso-8859-15-2.16-r22.i586 eglibc-binary-localedata-sv-fi.iso88591 is needed by locale-base-sv-fi.iso-8859-1-2.16-r22.i586 This fixes things so the names are consistent. (From OE-Core rev: 17e1bfe2b1260add9749b5ff73c72d57c0215fdc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add and use 'localedir' variableChristopher Larson2012-09-251-13/+14
| | | | | | | | | | | | | | This avoids the hardcoding of ${libdir}/locale which is all over the place, and will facilitate use of ${exec_prefix}/lib/locale instead of ${libdir}/locale. This doesn't actually change any output at this time. Verified this with buildhistory against the packages produced from core-image-base. (From OE-Core rev: b744f4cc2912334b8493a89525fd02af8e9b8edf) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove a number of unneeded import os/bb callsRichard Purdie2012-07-191-1/+1
| | | | | | | | | | The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. (From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-263/+263
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: Add sh4 and mips64 to arch optionsKhem Raj2012-05-211-0/+3
| | | | | | | | | needed for new architecture support (From OE-Core rev: 75167eb890d8e4683f1e3852e3b77c67d160bea7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (libc-)package.bbclass: Added MLPREFIX to locale packages.Lianhao Lu2012-05-181-2/+2
| | | | | | | | | Added multilib prefix to the locale related package names/dependencies. (From OE-Core rev: a52f7cf2cc90d918e3250c410995dcc1f3bfd5ee) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: Add MLPREFIX while dynamically set RDEPENDSDongxiao Xu2012-05-091-5/+7
| | | | | | | | | We need to add MLPREFIX when set RDEPENDS by setVar() function. (From OE-Core rev: 9407895c88e46490d0ef9bb185f73466e7204c15) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: rework ''precompiled' locale handlingChristopher Larson2012-05-031-51/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a couple problems with the handling of precompiled locales. - it gathered the list of locales from the directories - this breaks due to the naming mismatch, e.g. en_US.UTF-8 vs en_US.utf8. - it retained its hardcoded assumption that the non-suffixed locale (en_US, as opposed to en_US.*) is UTF-8, while the others are otherwise. Hardcoding this is both inflexible and just plain wrong for some toolchains. It's most common in desktop distros for 'en_US' to be non-utf8, and ''en_US.UTF-8' is utf8, and this is the case in some external toolchains as well. The code now uses the SUPPORTED file to hold the knowledge it needs. This file not only holds the list of locales to generate, but also maps the locale names to the charsets they correspond to. The code now uses this to assemble its charset map, falling back to the '.' suffix as charset when the locale is not in the map. For precompiled, it now uses the locale->charset knowledge it has, thereby allowing non-utf8 non-suffixed locale names, whereas for non-precompiled, it reverts to the previous assumption, renaming the utf8 locale and forcibly suffixing the others. So, a person maintaining an external toolchain recipe is responsible for ensuring that the SUPPORTED file they provide matches up with the compiled locales in the toolchain, if they want to utilize precompiled locales. I believe in the long term the compiled case should do the same thing precompiled does, and use SUPPORTED or a similar mechanism to encode the knowledge, and if people want all the non-suffixed names to be utf8, they can change that file to do so. This would avoid the hardcoded assumption in the code, as well as consolidating the behavior between the compiled and precompiled cases. (From OE-Core rev: 3f36058923ccda25a3dd85046542e65b6034c09e) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Multilib: Fix RDEPENDS in libc-package.bbclass, useradd.bbclass...Zhai Edwin2012-04-161-1/+1
| | | | | | | | | MLPREFIX is needed in RDEPENDS for multilib build (From OE-Core rev: 380efadd5640e5b57e710549b1ae761d0d3b3792) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* eglibc packaging: locale packaging configurationNitin A Kamble2012-04-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libc-packgae.bbclass: Add i686 support in locale_arch_optionsNoor Ahsan2012-03-291-0/+1
| | | | | | | | | | | * While building for i686 architecture an error was coming that locale_arch_options does not have support for i686. Add missing support. * Verified on intel architecture. (From OE-Core rev: c8afc79b5d3205355ad61d2589221bf8babe8395) Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* external-csl-toolchain: fixes for metadata changesChristopher Larson2012-02-021-1/+3
| | | | | | | | | | | | | | | | | These allow the recipe to build again: - add compilerlibs, g++, libgcc to the provides - add linux-libc-headers-dev to the packages - in libc-package, only sed the ldd.bash.in file if it exists, as the external toolchain is using that class as well - shift the inherit location of the libc classes, as they were overriding the recipe's do_install - use ?= for EXTERNAL_TOOLCHAIN, so the user can set it (From OE-Core rev: 8fb1c84f4cadf8d7a061fd6d90d270c19b474bfe) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: fix typo in LOCALETREESRC default valueChristopher Larson2012-02-021-1/+1
| | | | | | | (From OE-Core rev: 73ff2f404392a6942ec89af15ec7f52fe2e629a6) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* locale: fix package's "provides" tagNitin A Kamble2012-01-171-3/+0
| | | | | | | | | | | | | | | | | | | | | Fixes this bug: [YOCTO #1874] Fixes an issue where a locale package depends on one package while it also provides the same, as seen bellow. Package: locale-base-de-de Version: 2.12-r19 Depends: eglibc-binary-localedata-de-de Provides: virtual-locale-de-de, virtual-locale-de, eglibc-binary-localedata-de-de Actually the eglibc-binary-localedata-de-de is ia separate package, and it should not be part of provides of the locale-base-de-de. (From OE-Core rev: 49c5ff7197b44c7d29d31506c2425b86bc2c1ff6) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: Fix typo in setVar usageRichard Purdie2011-12-011-1/+1
| | | | | | (From OE-Core rev: 30584cbcdc4b709c52325a321c1175bfaf63a167) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* getVar/setVar cleanupsRichard Purdie2011-11-271-38/+38
| | | | | | | | | Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. (From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-33/+33
| | | | | | | | | | | | | | | | | This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: Use a makefile for locale gernation to increase ↵Richard Purdie2011-10-101-10/+15
| | | | | | | | | | | | | | parallelization We can generate the locales in parallel. The easiest way to do this is generate a Makefile and then run this with our usual parallel make options. [YOCTO #1554] (From OE-Core rev: 6ce8d028f2a542eceb270aeb511929953a859d39) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: add MLPREFIX when set values to PACKAGESDongxiao Xu2011-09-281-1/+1
| | | | | | | | | | | There are some places that PACKAGES are dynamically set. To support multilib, we need to add MLPREFIX before the package name in those settings. (From OE-Core rev: 693a4c31c9c071e5af21570107698ec79f709246) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: restore correct mangling behavior for locale namesPhil Blundell2011-08-311-2/+2
| | | | | | | | | | | | This reverts 19fb07bf337e1d724798e2eb4479c35fc45b1941 and restores the behaviour of the code to the way it was prior to 561d875404ef1783f94f37314b6e756766db8411. See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-August/007407.html and subsequent messages. (From OE-Core rev: e5810439cc394d8ebfc264b05e1fbfad19e8fcd3) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package bbclass: fix binary localedata dependency codeKoen Kooi2011-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When using binary locales rootfs generation fails with: | Unknown package 'locale-base-en-us'. | Collected errors: | * opkg_install_cmd: Cannot install package locale-base-en-us. This is due to: $ dpkg-deb -I ipk/armv7a/locale-base-en-us_2.12-r16_armv7a.ipk | grep Depends Depends: eglibc-binary-localedata-en.us Note the '.' seperator $ ls ipk/armv7a/ | grep binary-localedata-en | grep us eglibc-binary-localedata-en-us_2.12-r16_armv7a.ipk Note the '-' seperator vs the '.' in the locale-base packages. (From OE-Core rev: 19fb07bf337e1d724798e2eb4479c35fc45b1941) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* eglibc-locale: Specially handle FILES_eglibc-gconv for multilibDongxiao Xu2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | | In multilib support, it iterate values in PACKAGES and then extend name for variables like "FILES_xxx", "SUMMARY_xxx", etc. However eglibc-gconv is dynamically put in PACKAGES by package_do_split_gconv function. Therefore the name will not be extended automatically. Specially handle the FILES variable for eglibc-gconv to fix the issue of missing "lib32-eglibc-gconv" issue in doing multilib do_rootfs. Also when set PACKAGES, add the MLPREFIX. (From OE-Core rev: 4a5cc82218fa730b898c553875accfeb6800f9a4) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc: Add handling of powerpc64Kumar Gala2011-07-221-0/+1
| | | | | | | (From OE-Core rev: 76038de5e2d090c9864339531423a6d26403500c) Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc locale split: fix some remaining problemsKoen Kooi2011-06-291-4/+1
| | | | | | | | | | | | | | * libc-{common,package}.bbclass: fix shlib renaming for the C library Without this you'd end up with eglibc_2.12.ipk instead of libc6_2.12.ipk as before * eglibc-locale: don't make versions go backwards after split from eglibc eglibc was way beyond PR = "r1" at the time of the split, so increase PR to make package upgrades work [RP: Fixup PR merge conflict] (From OE-Core rev: 477ede7472db0bacd5daacb96e97f849d1be84ee) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-locale: Fixup various packaging warningsRichard Purdie2011-06-291-3/+4
| | | | | | | | | | | | After the recent locale changes there were warnings about many unpackaged files. Fix this by directing libc-package.bbclass to operate directly on the files in the sysroot and adding packaging for .debug files in this package. Also sync up the eglibc and glibc versions of this code more closely. (From OE-Core rev: 1a3a76e4652b95b640c287cb3672ccc146b023ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: Replace hard coded libdir.Lianhao Lu2011-06-281-3/+4
| | | | | | | | | | Replace the hard coded libdir for locale generating to meet the multilib requirement. (From OE-Core rev: 1609fd2b6582667106a6f065cfa031f68cee7552) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-locale: split locale handling from libc recipe.Dongxiao Xu2011-06-281-24/+0
| | | | | | | | | | | | | | *libc's do_package will cost a lot of time due to the locale handing, which may delay the other recipe's do_package task and affect the build performance. This commit moves locale handling into a separate recipe *libc-locale. [RP: Add fixup with recent eglibc commit conflict for FILES_pn-dbg and PACKAGES] (From OE-Core rev: c6d3242f7642f537b02870bb4eb650f0e2094b85) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: fix typo causing annoying diagnosticPhil Blundell2011-06-021-1/+1
| | | | | | | | | | | | We don't package /etc/rpc and do_install() makes some effort to remove that file so as to avoid the "installed but not shipped" diagnostic. But, due to a typo in the command line, the file wasn't actually being removed and the diagnostic continued to be issued. (From OE-Core rev: 5b09d5dbac044277b5f1145057d1fc716ec35b9a) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package.bbclass: Disable lib packaging dependenies for libc-initial ↵Richard Purdie2011-02-171-0/+4
| | | | | | versions Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Misc hard link fixesMark Hatle2011-02-091-6/+6
| | | | | | | | | I searched the various classes and looked for copies that should attempt to preserve hardlinks. This fixes the majority of this copies by switching to using tar as the copy method. It also has the side effect of preserving sparse files. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* libc-package.bbclass: should not rm scsi/*.hDexuan Cui2011-01-171-3/+0
| | | | | | | | | | | {e}glibc should install the scsi/*.h files, which are needed by hal. Currently hal can build because eglibc-initial (which has its own do_install) installs the files. In future eglibc will have its own sysroot, so hal won't build. BTW: in OE side, eglibc's do_install also doesn't remove the files. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* libc-package.bbclass, eglibc, glibc: enable locales generation using ↵Nitin A Kamble2010-10-071-12/+61
| | | | | | | | | | | | | | | | | | | cross-localedef Along with qemu this provides another option to generate locales for [e]glibc. The new method is to use cross-localedef with appropriate arch specific parameters. The cross-localedef method is found to be 15 times faster than qemu's emnualted method. LOCALE_GENERATION_WITH_CROSS-LOCALEDEF : This is new config variable introduced to selet qemu or cross-localedef method for locale generation. Thanks to Mark Hatle from Windriver for providing the rich information for cross locale generation. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* libc-package.bbclass: fix qemu issue with pseudoNitin A Kamble2010-09-101-1/+1
| | | | | | | | | | | | | | This solution is what Mark Hatle recommended. To disable pseudo, while already running, you need to set: PSEUDO_RELOADED=YES, and then exec something... This causes pseudo to disable itself from LD_PRELOAD, and thus fall out of memory on the exec. This Fixes [BUGID #226] Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* libc-package.bbclass: merge glibc & eglibc class filesNitin A Kamble2010-09-021-0/+349
Other enhancements: print qemu's stdio & error on failure glibc: enable locale generation for all arches eglibc: enable binary locale generation for mips And cleanup of code based on the code review. [e]glibc: move common definition in the common file bitbake was complaining about duplicate definition of get_libc_fpu_setting in eglibc.inc & glibc.inc files. And bump PRs Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>