summaryrefslogtreecommitdiff
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* native.bbclass: Add a simple chown intercept commandMark Hatle2011-06-231-0/+2
| | | | | | | | During native recipe processing we want to intercept any calls to chown and do nothing. This prevents errors and allows the same recipes to be used for both native and target recipes. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* kernel.bbclass: Stop do_install poking directly into the sysroot and evading ↵Richard Purdie2011-06-231-1/+1
| | | | | | | | | | | | | sstate do_install was putting files directly into the sysroot which means sstate had no knowledge of them. This meant they didn't get cleaned along with the other files from the task amongst other issues. This patch puts them in ${D} where they were supposted to be. Tested-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_rpm.bbclass: Change the way the PV is transformedMark Hatle2011-06-231-5/+18
| | | | | | | | There were some odd instances where the PKGV could not be loaded in the old way. Change to verify that PKGV exists before attempting to retrieve the value from the key. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* kernel.bbclass: Stage System.map with KERNEL_VERSION suffixTom Rini2011-06-231-0/+1
| | | | | | Without this, images will fail now that kernel-abiversion is back. Signed-off-by: Tom Rini <tom_rini@mentor.com>
* kernel.bbclass: restore kernel-abiversion fileKoen Kooi2011-06-231-0/+6
| | | | | | | | | | | | | | | This fixes external module recipes that need $KERNEL_VERSION. It got removed by commit a9d41062e24a6b99661b3a5256f369b557433607 Author: Darren Hart <dvhart@linux.intel.com> Date: Tue Mar 8 17:09:10 2011 -0800 kernel/bbclass: rework kernel and module classes to allow for building out-of-tree modules seemingly as an oversight. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Acked-by: Darren Hart <dvhart@linux.intel.com>
* kernel.bbclass: Add support for perf-dbg packageMark Hatle2011-06-231-1/+2
| | | | | | | | | The perf component is built with the kernel, so ensure that it gets the debug information associated with it. Also bump the PR in the linux-yocto-* to ensure they get rebuilt. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* classes/package_rpm.bbclass: Enhance diagnostic messagesMark Hatle2011-06-231-1/+6
| | | | | | | | | We clearly state now if we are: * Skipping an empty package * Creating a (full) package * Creating an empty package Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* native.bbclass: allow a native package to be populated into its own dirDexuan Cui2011-06-141-0/+5
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* perlnative.bbclass: add the fileDexuan Cui2011-06-141-0/+2
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* cpan.bbclass, cpan-base.bbclas: update them for the perlnative changeDexuan Cui2011-06-142-9/+13
| | | | | | | Since perl-native now populates into its own dir, here we need change accordingly. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* import recipe_sanity.bbclass from oe masterPhil Blundell2011-06-141-0/+179
| | | | | | This is a verbatim copy of the corresponding class from oe master. Signed-off-by: Phil Blundell <philb@gnu.org>
* nativesdk.bbclass: Correct ordering of manipulationsRichard Purdie2011-06-131-16/+37
| | | | | | | | | | | | OVERDIDES is the key variable that needs to be set prior to data finalisation. The other variables should be manipulated after finalisation so any DEPENDS_prepend and _append are accounted for. This patch ensures this is the case. The PACKAGES maniupulations are not enabled at this time as they don't function 100% correctly yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* task-sdk-host: Add nativesdk to the task name so its clearer what the ↵Richard Purdie2011-06-131-1/+1
| | | | | | | | | contents of the task represent This is particularly important since the file doens't use BBCLASSEXTEND and PN is therefore misleading Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Clean up the depends ordering after bitbake override ↵Richard Purdie2011-06-094-45/+54
| | | | | | | | | | | | handling updates This massively cleans up the dependency handling in the two classes when interacting with BBCLASSEXTEND. This change has a dependency on the bitbake override handling change and also the existence of the RecipePreFinalise event. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Since we apply the override, look for the standard name ↵Richard Purdie2011-06-091-1/+1
| | | | | | variable, not the override name Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: PACKAGELOCK is a shared lock file so inform sstate as suchRichard Purdie2011-06-091-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: When removing files, take an exclusive lock, even for shared ↵Richard Purdie2011-06-091-1/+1
| | | | | | lockfiles Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: make RPM use on-disk permissionsScott Garman2011-06-061-0/+2
| | | | | | | | | Instruct RPM to use the on-disk permissions, owners, groups, and directory permissions, instead of defaulting to root:root Code changes suggested by Mark Hatle. Signed-off-by: Scott Garman <scott.a.garman@intel.com>
* base.bbclass: add cleansstate task between clean and cleanallMartin Jansa2011-06-061-2/+5
| | | | | | * sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* allarch.bbclass: Define BASE_PACKAGE_ARCH = "all"Khem Raj2011-06-061-0/+1
| | | | | | | If not overridden it gets the value which is for target recipes usually defined in machine tune files Signed-off-by: Khem Raj <raj.khem@gmail.com>
* qmake_base.bbclass: fix lrelease/lupdate binary namesOtavio Salvador2011-06-021-0/+5
| | | | | | | | | | To support translation, qmake based projects usually call lrelease and lupdate however OE changes the binary names so this needs some mangle to work out of box. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Paul Eggleton <paul.eggleton@linux.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. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: delete opkg metadata if package management not required and all ↵Phil Blundell2011-06-021-0/+11
| | | | | | | | | | | | | | | | | | | packages are configured If all the postinsts were successfully run in offline mode, and package-management hasn't been requested as an IMAGE_FEATURE, the opkg metadata is now redundant and can safely be deleted. Also, the update-rc.d and base-passwd packages can be removed since they will serve no further purpose in this situation. If some packages are still unconfigured at this point then we need to keep their metadata around so that either opkg or the awk script can configure the packages at boot time. In theory it would be possible to strip out the data for packages that have already been configured, but right now we just hold on to the whole status file in that situation. Signed-off-by: Phil Blundell <philb@gnu.org>
* siteinfo: replace all-linux with allarch-linux to match ↵Martin Jansa2011-06-021-1/+1
| | | | | | | 5d7d4e1ed9bedf2b6510796d76ea8f94739b9de2 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binconfig: improve handling of empty prefixesPhil Blundell2011-06-011-2/+2
| | | | | | | | | | | This is a backport of 952e5e2b7a5c1deefc939594d40b81a71fb16a54 from oe master. Without this the script mangling goes very wrong if ${prefix}="". There isn't really any way to fix this in the completely general case, but this patch does work with the two cases I tested (freetype and gpg-error) which were unusable previously. Signed-off-by: Phil Blundell <philb@gnu.org>
* allarch.bbclass: A "all" TARGET_ARCH is dangerous as an OVERRIDERichard Purdie2011-06-011-1/+1
| | | | | | | | | Having a generic word like "all" as an override is dangerous as this is an override and can cause issues for function names like "sysroot_stage_all". This patch changes it to "allarch" to help avoid this kind of problem. The field is only used in the name of directories anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Improve handling of 'all' architecture recipes and their interaction with sstateRichard Purdie2011-05-312-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing PACKAGE_ARCH = "all" mechanism of sharing packages is problematic with sstate since there are a variety of variables which have target specific values and the sstate package therefore correctly changes signature depending on the MACHINE setting. This patch creates a new "allarch" class which sets: PACKAGE_ARCH = "all" (as per the existing convention) INHIBIT_DEFAULT_DEPS = "1" (since its not target specific and therefore can't depend on the cross compiler or target libc) TARGET_ARCH = "all" TARGET_OS = "linux" TARGET_CC_ARCH = "none" (since these variables shouldn't change between the different packages and target compiler flags shouldn't be getting used) PACKAGE_EXTRA_ARCHS = "" (since we shouldn't be depending on any architecture specific package architectures) Not all PACKAGE_ARCH = "all" recipes can use this class since some run configure checks on the compiler. This means they have target specific components and therefore the "all" classification is incorrect. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass,prserv.bbclass: Compare USE_PR_SERV with "1" or "0"Khem Raj2011-05-292-2/+2
| | | | | | | | | Value of USE_PR_SERV is either "1" or "0" looking at settings in bitbake.conf USE_PR_SERV = "${@[1,0][(bb.data.getVar('PRSERV_HOST',d,1) is None) or (bb.data.getVar('PRSERV_PORT',d,1) is None)]}" So we compare the strings Signed-off-by: Khem Raj <raj.khem@gmail.com>
* license.bbclass: Infinite recursion of or nodesBeth Flanagan2011-05-291-7/+8
| | | | | | | | | | This fixes two bugs. When populate_lic was hitting | it was going into an infinite recursion of the node. Also, some LICENSE fields may start with "(". We want to avoid invalid python syntax here, so we strip out the whitespace. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
* license.bbclass: Sane Parsing of licensesBeth Flanagan2011-05-271-38/+114
| | | | | | | | | | | | | | | | | | | | | This is a first pass at sane license parsing, using python abstract syntax trees. A few notes on this since ast is not generally used. I massage the LICENSE field to be more pythonesque and then create an ast. I then dump the ast and using a LicenseVisitor class, recurse through the tree, looking for licenses. I then copy and link. It's cleaner, allows for easier addition of logic and while it takes slightly more CPU, it's also slightly faster in initial small scale tests. It doesn't recognize the '+' or '*' modifiers to the licenses yet nor does it know what to do with bitors (|), since I'm not even sure what to do with them. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
* classes/package_xxx.class: Use PKGE/PKGV/PKGR.Lianhao Lu2011-05-274-17/+17
| | | | | | Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR.Lianhao Lu2011-05-272-15/+65
| | | | | | | | | | | 1. Added package_get_auto_pr to PACKAGEFUNCS to get the auto incremented value(PRAUTO) from remote PR service. 2. use PKGV/PKGR for pkgdata which will be used by package_write_xxx. 3. Added supporting functions in prserv.bbclass. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* utils.bbclass: make FILESEXTRAPATHS colon delimitedDarren Hart2011-05-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO 1102] Path variables are typically : delimited. White space is allowed in paths, so is not a good choice for separating paths. Currently utils.bbclass performs the following: extrapaths = (bb.data.getVar("FILESEXTRAPATHS", d, True) or "").split() This splits FILESEXTRAPATHS on whitespace. It later splits overrides on : and reassembles them all together as : delimited. There is only one user of FILESEXTRAPATHS in oe-core (qt4-tools-native, which uses : anyway) and none in oe. Change the split() in utils.bbclass to split on : instead of whitespace. When splitting on a defined string (":") we must be careful to handle the empty string case which returns [''] instead of []. Tested building qt4-tools-native and core-image-minimal for surgarbay from meta-intel with a couple extra layers with FILESEXTRAPATHS modifications added. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: keep all sigdata files in stamps dirMartin Jansa2011-05-271-0/+4
| | | | | | | * this makes fix for [YOCTO #1074] in bitbake 139b8a625818225c358a1b8363518d7ed6913188 much more usefull for people using rm_work Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all ↵Phil Blundell2011-05-251-0/+10
| | | | | | maintainer scripts could be applied offline Signed-off-by: Phil Blundell <philb@gnu.org>
* image_types: add IMAGE_ROOTFS_EXTRA_SPACESaul Wold2011-05-251-1/+1
| | | | | | | | | | | | | [YOCTO #886] This address 2 needs after the IMAGE_ROOTFS_SIZE is cleaned up, by removing the _ext2/3 overrides it allows for a cleaner override using IMAGE_ROOTFS_SIZE to create a large rootfs, or by setting the IMAGE_ROOTFS_EXTRA_SPACE, will allow for extra space allocated in Kilobytes above the base size (determined by du of the rootfs * IMAGE_OVERHEAD_FACTOR, default of 1.3). Signed-off-by: Saul Wold <sgw@linux.intel.com>
* IMAGE_ROOTFS_SIZE CleanupSaul Wold2011-05-251-2/+5
| | | | | | | | | | | | | | This basic cleanup removes the _ext2/3 overrides from places they no longer belong since they did not allow further overrides. In doing this the core-image-minimal* recipes can now set a reasonably small rootfs so that it's a realistic size for minimal. The new default for minimal is 8M and will be adujsted upward by the IMAGE_OVERHEAD_FACTOR (default of 1.3). This also fixes the ROOTFS_SIZE usage in the IMAGE_CMD_<fstype> code Signed-off-by: Saul Wold <sgw@linux.intel.com>
* Move packagedata code into oe.packagedata (sync from OE)Chris Larson2011-05-203-66/+9
| | | | Signed-off-by: Chris Larson <chris_larson@mentor.com>
* oe.packagegroup: add code for package groups (sync from OE)Chris Larson2011-05-201-1/+1
| | | | | | | | | | | | | This includes some utility functions for dealing with groups of packages defined in the metadata. Metadata syntax: PACKAGE_GROUP_<group> = "<list of packages>" If the packages in the group are optional: PACKAGE_GROUP_<group>[optional] = "1" Signed-off-by: Chris Larson <chris_larson@mentor.com>
* base.bbclass: use oe.data for OE_IMPORTSChris Larson2011-05-201-1/+3
| | | | Signed-off-by: Chris Larson <chris_larson@mentor.com>
* Shift oe import logic out of the event handlerChris Larson2011-05-201-15/+18
| | | | | | | This can be useful if we need the imports from another config parsed event handler, and can't rely upon the base one running before that one. Signed-off-by: Chris Larson <chris_larson@mentor.com>
* base.bbclass: switch to current OE's imports handlingChris Larson2011-05-201-13/+9
| | | | | | | The current mechanism makes it easier for classes to add new oe modules to be automatically imported, and thereby made available to python snippets (${@}). Signed-off-by: Chris Larson <chris_larson@mentor.com>
* Implement variable typing (sync from OE)Chris Larson2011-05-202-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implementation consists of two components: - Type creation python modules, whose job it is to construct objects of the defined type for a given variable in the metadata - typecheck.bbclass, which iterates over all configuration variables with a type defined and uses oe.types to check the validity of the values This gives us a few benefits: - Automatic sanity checking of all configuration variables with a defined type - Avoid duplicating the "how do I make use of the value of this variable" logic between its users. For variables like PATH, this is simply a split(), for boolean variables, the duplication can result in confusing, or even mismatched semantics (is this 0/1, empty/nonempty, what?) - Make it easier to create a configuration UI, as the type information could be used to provide a better interface than a text edit box (e.g checkbox for 'boolean', dropdown for 'choice') This functionality is entirely opt-in right now. To enable the configuration variable type checking, simply INHERIT += "typecheck". Example of a failing type check: BAZ = "foo" BAZ[type] = "boolean" $ bitbake -p FATAL: BAZ: Invalid boolean value 'foo' $ Examples of leveraging oe.types in a python snippet: PACKAGES[type] = "list" python () { import oe.data for pkg in oe.data.typed_value("PACKAGES", d): bb.note("package: %s" % pkg) } LIBTOOL_HAS_SYSROOT = "yes" LIBTOOL_HAS_SYSROOT[type] = "boolean" python () { import oe.data assert(oe.data.typed_value("LIBTOOL_HAS_SYSROOT", d) == True) } Signed-off-by: Chris Larson <chris_larson@mentor.com>
* kernel.bbclass: pass KERNEL_VERSION through legitimize_package_nameAndreas Oberritter2011-05-201-2/+2
| | | | | | | | | - KERNEL_VERSION may contain characters unsuitable for package names, e.g. underscores. Use legitimize_package_name to replace those characters. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package-index.bb: add support for deb and rpm.Dexuan Cui2011-05-203-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #1024] Currently package-index.bb only supports ipk. This commit adds the support for rpm and deb, too. ------------------------------ How to generate and use repos: 1) run "bitbake package-index" after building some target, e.g., core-image-sato-sdk; 2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a webserver on the host, assuming the host IP is 192.168.7.1, at http://192.168.7.1/rpm http://192.168.7.1/ipk http://192.168.7.1/deb 3) inside the target, according to the packaging system (rpm, ipk or deb) used when we generate the target image, we can use different ways to manage packages: 3.1) RPM run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh" to retrieve info about the repo; next, we can use "zypper install/remove" to manage packages. 3.2) IPK add the repo info into opkg config file, i.e., in /etc/opkg/arch.conf, we can add something like "src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to make opkg update the list of available packages. And later, we can use "opkg install/remove" to manage packages. 3.3) DEB Currently in target, some important config files, like /var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So we can't install/remove package in target at present. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* utils.bbclass: modify create_wrapper to correctly follow symlinksSaul Wold2011-05-191-1/+2
| | | | | | This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold <sgw@linux.intel.com>
* utils.bbclass: modify create_wrapper to correctly follow symlinksSaul Wold2011-05-191-1/+2
| | | | | | This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold <sgw@linux.intel.com>
* Couple minor fixes for the OECORE renameJessica Zhang2011-05-181-3/+3
| | | | Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
* yaffs2: Remove yaffs2 from oe-coreSaul Wold2011-05-181-3/+0
| | | | | | | Move to meta-extras Also remove yaffs2 from image_types.bbclass Signed-off-by: Saul Wold <sgw@linux.intel.com>
* sanity.bbclass: Disable the is DISTRO set check since we can now run distro-lessRichard Purdie2011-05-181-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>