summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* autotools.bbclass: Factor out aclocal copying functionRichard Purdie2013-06-041-15/+22
| | | | | | | | | | | Some recipes may need to manually call the aclocal copying functionality so factor this out into a function. (From OE-Core rev: a5a08543c8cec43d993b2bba0ad6a9357c0a5e04) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: make sure python is a full installJesse Zhang2013-06-041-0/+6
| | | | | | | | | | | | | Components of the Standard Library should be available. Add a sanity check for xml.parsers.expat; we might add more in the future. [YOCTO #4424] (From OE-Core rev: bb027a332f2f2927a6bcbc4c035b42a012d0579e) Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: fixup extra hardcoded pathsJackie Huang2013-06-041-0/+11
| | | | | | | | | | | | | | | sstate has a logic to fixup hardcoded paths in scripts, but it misses in some specific cases, so add EXTRA_STAGING_FIXMES to the fixup hardcoded paths mechanism, so that we can specify what hardcoded paths need to be fixed in a recipe, e.g. EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN" (From OE-Core rev: 2e840db56c45b4c63fded55f4ed763b7099284b9) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record removals in buildhistory directoryJonathan Liu2013-06-041-1/+1
| | | | | | | | | | | | | | | "git add ." does not record files that were removed in the buildhistory directory. Specify the -A flag to also record removals. This was discovered by the following warning added in Git 1.8.3: warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. (From OE-Core rev: a45a247e2cfa58892a0c9eb050d603a38cd839db) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils.bbclass: ensure $0 is correct in wrapper scriptsRoss Burton2013-05-301-4/+5
| | | | | | | | | | | | | | | Some packages (eg mesa) will invoke a tool with --version and do string matches on the output (i.e. mesa does $LEX --version |grep "^flex "). This doesn't work with the combination of wrapper scripts and binaries that use $0 as they output "flex.real". Luckily bash's exec lets you set $0. As we want to use this we can't use env, but using export appears to work just as well. (From OE-Core rev: e8d2a2a3646f964ec61ece62e14788cd7184dd01) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: add more documentationRoss Burton2013-05-301-0/+3
| | | | | | | | | | | Add some more documentation to the PIXBUFCACHE_SYSROOT_DEPS variable to clarify the usage. (From OE-Core rev: b2f2d6a2b166b3c79cc5a0d386ee1dda2d4fa010) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: modify construction of compiler flagsJoe Slater2013-05-291-2/+2
| | | | | | | | | | | | | | | | | Use CFLAGS instead of CPPFLAGS for C_FLAGS variants. When debug optimization is enabled in the local.conf, the debug (-O0) vs production (-O2) does not change in the builds. As the CPPFLAGS do not contain the optimization settings. Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly set the C_FLAGS based on CFLAGS. (From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127) Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qmake_base.bbclass: Add linux-gnun32-oe-g++ to QMAKESPECXin Ouyang2013-05-291-1/+1
| | | | | | | | | | | | | | For some mips targets, TARGET_OS is set to linux-gnun32, while linux-gnun32-oe-g++ is not listed in the default QMAKESPEC list of qmake in oe-core/wrlinux. This would cause build failures for qt apps, so add a matching rule to fix this. (From OE-Core rev: 70b75d506e6c4b46694b00d674df9d4a94140bd6) Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo.bbclass: Add mips64 common siteinfoMark Hatle2013-05-291-2/+2
| | | | | | | | | There is no mips64-common file, replace the definition with mips-common. (From OE-Core rev: b6107abd50da651596c43119001cfc80fdf87554) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: ignore failure for removing pseudo folderMing Liu2013-05-241-3/+6
| | | | | | | | | | | | | | | | | | | When building over NFS2/3 server, removal of pseudo folders will fail in some cases for there are files in it still used by pseudo daemon, thus cause ".nfsXXXXX" files generated which can't be removed by clients. This will lead rm_work task fo fail. These failures could be safely ignored because ".nfsXXXXX" files would be automatically cleared by NFS server when no clients keep opening them. [YOCTO #4531] [ CQID: WIND00412051 ] (From OE-Core rev: 9742e866f545bc0d04aca697b541ed88f4e1764a) Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cross: Clear do_populate_sysroot[stamp-extra-info] so that stamps are not ↵Phil Blundell2013-05-241-0/+1
| | | | | | | | | | | | | | MACHINE specific Otherwise we will try to run the setscene task once per MACHINE which will lead to file conflicts in the sysroot for packages like gcc-cross. The stamps are already namespaced by TARGET_ARCH which should be sufficient. (From OE-Core rev: 66d09565783186ab14fa77ecdfe2131a44a265ab) Signed-off-by: Phil Blundell <philb-mXXj517/zsQ@public.gmane.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Remove unnecessary cd and rm, fix MODULE_TARBALL_SYMLINK_NAME creationMartin Jansa2013-05-241-6/+3
| | | | | | | | | | | | * DEPLOYDIR is used as target for every other file deployed by do_deploy, this was just unnecessary switching CWD to create relative symlink and I have no idea why rm -f was used together with ln -sf. (From OE-Core rev: 8375782a295c6294ea4ab889c309bebf873f3489) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* clutter.bbclass: removed unused functionTomas Frydrych2013-05-241-5/+0
| | | | | | | | | | | Clutter and cogl no longer use --with-fpu configure option, so we no longer require the get_fpu_settings() function. (From OE-Core rev: ea59330c48cdb7d7106deea3f19c043ba60c23e4) Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Add dependency on binutilsMike Crowe2013-05-241-1/+1
| | | | | | | | | | | | | | | | | | Compiling the Linux kernel requires binutils; kernel.bbclass uses INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly. (The lack of this dependency isn't always a problem because binutils is required to build gcc-cross but if gcc-cross is reconstructed from the sstate cache then gcc-cross's dependency on binutils-cross is ignored due to being in the safe dependency list in setscene_depvalid.) (From OE-Core rev: 37beb7bdab78de5253a894f35afafa34c13a00f5) Signed-off-by: Mike Crowe <mac@mcrowe.com> Acked-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: update the loader cache when installing nativelyRoss Burton2013-05-241-0/+20
| | | | | | | | | | | Register a sstate postinst function so that when installing a native package, the gdk-pixbuf loader cache is updated. (From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Drop dubious printRichard Purdie2013-05-241-1/+0
| | | | | | (From OE-Core rev: be4cd4614a2a702130d18e9d082fd83a15faa013) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Sync with bitbake changesRichard Purdie2013-05-231-1/+4
| | | | | | | | | | Adjust to the recent changes in the git fetcher. This code should work with current and previous versions of bitbake and can be cleaned up when we move to new bitbake versions. (From OE-Core rev: 835b64d4e9ed7b627b56a75d529f1a403c5db1a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: add postinst_enable_loggingChen Qi2013-05-231-0/+11
| | | | | | | | | | | | | | Add a function postinst_enable_logging, so that when 'debug-tweaks' is in IMAGE_FEATURES, we create ${sysconfdir}/default/postinst config file, which is sourced by run-postinst scripts to determine whether to log or not, and where to log. [YOCTO #4262] (From OE-Core rev: 99175cabc3936733dd92fac5ebc6f865b864fe92) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* task.bbclass: Drop deprecated classRichard Purdie2013-05-221-6/+0
| | | | | | | | Any users have had time to adapt to this change by now, drop the old class. (From OE-Core rev: 9b64b68c93c71c503ef26fa440b974b82438dc88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives: Drop deprecated code, update to show error messageRichard Purdie2013-05-221-94/+1
| | | | | | | | | This code has been deprecated for a while and confuses the class, lets drop it and just give the user hard error messages instead of the current warnings/fixups. (From OE-Core rev: 72579e1fe49e8bc66c9f5850a2c679ce8941c85d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* clutter.bbclass: helper class for clutter and friendsTomas Frydrych2013-05-211-0/+28
| | | | | | | (From OE-Core rev: 19b7e58b71d31071361f19fd82666d40653569c4) Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: remove the old imagesRobert Yang2013-05-211-1/+5
| | | | | | | | | | | | | | Remove the old image before the new one generated to save disk space when RM_OLD_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean. [YOCTO #4391] (From OE-Core rev: b3e2e405c53d63bc71872d41f455507be833e7eb) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup fileZongchun Yu2013-05-161-0/+3
| | | | | | | | | | | when compiling the linux kernel manually. users need to set CROSS_COMPILE separately. adding the CROSS_COMPILE variable will be nice for using. (From OE-Core rev: b66ec45e5dd9418a6568c04ef30854531a4b66f3) Signed-off-by: Zongchun Yu <b40527@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bbclass: bb.fatal() clean upRobert Yang2013-05-163-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bb.fatal() is defined as: def fatal(*args): logger.critical(''.join(args)) sys.exit(1) So anything after bb.fatal() in the same code block doesn't have any effect, e.g.: bb.fatal("%s_%s: %s" % (var, pkg, e)) raise e The "raise e" should be removed. I searched all the files which use bb.fatal(), only the following 3 classes have this issues: insane.bbclass package.bbclass package_rpm.bbclass [YOCTO #4461] (From OE-Core rev: 4c47525c5a171b1282615c9fbc7d84addef85f92) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflictsJonathan Liu2013-05-161-13/+12
| | | | | | | | | | | | These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe. (From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* syslinux: Update to 4.06Jonathan Liu2013-05-162-6/+6
| | | | | | | | | | | | | | | Patches are now part of upstream or no longer needed. Added new util-linux dependency for isohybrid. Paths updated to reflect directory structure changes. Add CFLAGS and LDFLAGS overrides. [YOCTO #4438] (From OE-Core rev: 17e7ac0c5e75245d17a90e5cc49ade3d18a168ba) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Add package-management image feature to validitemsKhem Raj2013-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some images dont use core-image bbclass and add this feature directly Fixes parsing errors like /builds1/angstrom/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 34734, PID: 24551 Parsing recipes...ERROR: Unable to parse /builds1/angstrom/sources/meta-kde/recipes-images/angstrom-kde-desktop-imag e.bb: Exited with "1" ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: Command execution failed: Exited with 1 (From OE-Core rev: f9f1397d688cc4eb8d736066b1280bee40a8916a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix sources contentsRichard Purdie2013-05-141-5/+5
| | | | | | | | | | | | | http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c376f1f49cea182a2887945840ab97a20970a373 fixed a valid issue where the sources file was accumulating information and subsequent task runs of do_packacge were not cleaning it. The fix is wrong however since we're removing the file within a loop. This fix removes the file outside the loop ensuring it is not truncated and contains the correct information. (From OE-Core rev: a015881f2207aded601459ba3eebbefb0002b3c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Attach the missing value to a format string.Peter Seebach2013-05-131-1/+1
| | | | | | | | | | The tuning changes to sanity.bbclass were almost right, but one of the messages had a %s with no % operator. (From OE-Core rev: cf5e40598ae9a83f22cabedc7b72000beb62703c) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-vmdk.bbclass: disable the NOISO = "1"Robert Yang2013-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | The vmdk needed hddimg which was generated by do_bootimg in the past, but do_bootimg generated both iso and hddimg, so we set NOISO = "1", it now uses do_bootdirectdisk, doesn't use do_bootimg anymore, so we don't need NOISO = "1", and need remove it, otherwise: IMAGE_FSTYPES += "live vmdk" Would not generate the iso. I'd like to remove it rather than comment it, but we had comment the do_bootimg before. (From OE-Core rev: c5c1517726aa103a3cdb60abda95e28997cac7c4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/core-image: drop apps-console-core IMAGE_FEATURES supportPaul Eggleton2013-05-121-8/+0
| | | | | | | | | | | Remove the legacy support for the apps-console-core IMAGE_FEATURES item; we've kept this for a while but it's time for it to go. (From OE-Core rev: bcd5ed8dd0e80cb76415cd2be9686d4e8023421d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: show an error on invalid IMAGE_FEATURESPaul Eggleton2013-05-121-0/+16
| | | | | | | | | | | | | | | | If the user specifies an invalid feature in IMAGE_FEATURES, show an error during parsing. Valid IMAGE_FEATURES are drawn from PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' varflag on IMAGE_FEATURES (so that additional non-package group features can be added elsewhere.) Implements [YOCTO #3308]. (From OE-Core rev: 8d25442ab795ff0f8e072da2022108eff128e2b2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-vmdk: Fix error recreating symbolic linkJonathan Liu2013-05-121-2/+1
| | | | | | | | | | | If the vmdk image symbolic link already exists from a previous build, overwrite it instead of returning an error. (From OE-Core rev: bcfb5a783dc94fe38539a19f4f7de249ce2391c1) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPESStefan Stanacar2013-05-121-11/+15
| | | | | | | | | | | | | | | | qemuimage-testlib hardcodes ext3 as fs type. This adds support for more images types which are supported by runqemu: ext[234]/jffs2/btrfs. I've skipped (for now) vmdk (which qemu can boot) because: - we don't have network on images without connman because of the way runqemu starts vmdk images (can't pass kernel args for network config) - qemuimage-testlib-pythonhelper relies on '192.168' being in the output of ps to return the pid (From OE-Core rev: 95b7cafafcaa4dda7328632475003f5778ab95bd) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/insane: add check for PN in OVERRIDESPaul Eggleton2013-05-101-0/+5
| | | | | | | | | | | | | | If a recipe is named such that its PN value matches something already in OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO), it can have unexpected consequences. Assignments such as FILES_${PN} = "xyz" effectively turn into FILES = "xyz". Implements [YOCTO #4288]. (From OE-Core rev: c331f0a5cac765174a1b5de5c12aec7e965d4158) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: track contents of selected files in imagesPaul Eggleton2013-05-101-0/+10
| | | | | | | | | | | | | | | Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated list of files within an image to copy into buildhistory, so that changes to them can be tracked. Typically this would be used for configuration files, and by default this includes /etc/passwd and /etc/group, but the user is free to extend this list by setting the variable in local.conf. Implements [YOCTO #4154]. (From OE-Core rev: ed6bb6e3db518082d3a9c45d548bc1339be2c5ca) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generationRobert Yang2013-05-103-3/+0
| | | | | | | | | | | | | | | | | | | We have removed the nostamps for do_rootfs and do_build, so it seems reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and do_vmdkimg. The current problem is that the do_vmdkimg always re-run, but the do_rootfs may not, so the code like below in the do_rootfs function doesn't re-run and cause problems (the symlink exists when the do_vmdkimg creates the symlink again): if d.getVar('IMAGE_LINK_NAME', True): cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" (From OE-Core rev: 45c7dab5d51065c7b24ab5292f8e9d3104eb0626) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: make FILES package-specificTom Zanussi2013-05-101-1/+1
| | | | | | | | | | | | Fix QA warnings seen when using 'traditional' kernel recipes e.g.: WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable FILES is set as not being package specific, please fix this. (From OE-Core rev: 799c16ed317aed7638e264ee2f92e4b722f1b011) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagetest-qemu: Fix indentationRichard Purdie2013-05-091-7/+7
| | | | | | (From OE-Core rev: 23ba10c61ff26bffb1a84972eb4e0bfb03561f89) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class/lib: Fix up various file access methodsRichard Purdie2013-05-099-71/+73
| | | | | | | | | | | | | | 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>
* buildstats: Drop spurious open() callRichard Purdie2013-05-091-1/+0
| | | | | | | | | This file is already opened a few lines previously, so drop the duplicated call. (From OE-Core rev: 4808629faa1222b31f92a3e410e06adb8e081293) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* useradd: Use modern join syntaxRichard Purdie2013-05-091-1/+1
| | | | | | | | | string.join() is deprecated syntax and doesn't work under python3 so use the modern sytax instead. (From OE-Core rev: 402d652edf79bcfe1eaf1a3b55ad1177d1e3ee85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Fix getcmdstatus breakageRichard Purdie2013-05-093-7/+6
| | | | | | | | | I mistakenly thought subprocess had getcmdstatus in python 2. It doesn't so lets add a wrapper and have this work in both worlds. (From OE-Core rev: 2253e9f12734c6e6aa489942b5e4628eca1fa29d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Drop unused/obsolete importRichard Purdie2013-05-091-1/+1
| | | | | | (From OE-Core rev: e501a98e87b8854040ac4081326871d7d6397917) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/kernel-module-split/eglibc-ld.inc: Remove has_key() usageRichard Purdie2013-05-092-3/+3
| | | | | | | | | The has_key() attribute has been removed in python 3 since there is better syntax available. Use the improved syntax. (From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity/patch.py: Remove commands module usageRichard Purdie2013-05-093-10/+9
| | | | | | | | | The commands module is removed in python3. Use the subprocess module instead and the pipes module to replace the mkargs usage. (From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Open file in binary modeRichard Purdie2013-05-091-1/+1
| | | | | | | | | We open the file we're writing to in binary mode so open the input stream with the same mode so things match. This avoids errors with python3. (From OE-Core rev: 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to use print as a function callRichard Purdie2013-05-092-5/+7
| | | | | | | | | In python 3 print is a function call. In some cases bb.note is a more appropriate call to make. (From OE-Core rev: 754874e68d1037c76fc4cc7d35d3fa12946d00f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm: Replace deprecated operatorRichard Purdie2013-05-091-2/+2
| | | | | | | | The <> operator is deprecated, use != instead which is equivalent. (From OE-Core rev: dde7af5f6c769eae721b1ee18462b841c8ea3277) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Use open(), not file()Richard Purdie2013-05-091-12/+12
| | | | | | | | file() syntax is removed in python 3, use open() instead. (From OE-Core rev: b2d10f15db23246e3957b69d77433f87674928bb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>