summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIRAdrian Ratiu2019-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | Some distributions for various reasons (like for example mounting a tmpfs over /var at runtime) can't use /var/lib to store the opkg metadata, so a different path is required to have a functioning package manager. ${localstatedir} can't be modified to something other than the hardcoded value in bitbake.conf because other recipes depending on it will fail to install. So the only recourse, which is also the least invasive, is to allow distros to overwrite the OPKGLIBDIR variable just like they are also allowed to overwrite OPKGBUILDCMD. (From OE-Core rev: 81eae383c287ad2e74321345c5eba862d5704cc4) Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_*: Also depend on do_package_qaTom Rini2018-10-091-1/+1
| | | | | | | | | | Make sure that we don't create images that have QA problems with their package files by adding do_package_qa to do_rootfs[recrdeptask]. (From OE-Core rev: 4ee2f87f0c9540c7e2c866dbc9739e21a618bddf) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-01-221-0/+1
| | | | | | | | | | | | repos don't conflict The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. (From OE-Core rev: 5e5569c962c9ebc898eeb5044214e95117b190e1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* run-postinsts: simplify the logic of whether to install it to imagesAlexander Kanavin2017-03-141-1/+0
| | | | | | | | | | The logic is scattered all over the place, but amounts to "install, unless the rootfs is read only". Let's express that directly. (From OE-Core rev: 697804229a172125ce7d3bfc9b343812d6fe3240) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Add expand parameter to getVarFlagRichard Purdie2016-02-041-1/+1
| | | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. (From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_*.bbclass: don't add BUILDNAME to do_rootfs vardepsexcludeMartin Jansa2015-11-241-1/+0
| | | | | | | | | | * rootfs_*.bbclass doesn't use this variable anymore, so we can drop it (From OE-Core rev: bf91547d887aee2893e26e6073e12c540222b422) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* opkg: Merge in opkg-collateralPaul Barker2015-02-031-1/+1
| | | | | | | | | | All non-arch-specific and non-distro-specific configuration is now kept in the main 'opkg' recipe and package. (From OE-Core rev: e8879cd1ec8914815c7a78f1d9b296b0e2b30fcf) Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_*: Refactor common depends/lockfile task flagsRichard Purdie2014-08-151-4/+2
| | | | | | (From OE-Core rev: 96427656ef73bb50753a33ec6ad5e73de711ceb3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>Richard Purdie2014-08-151-0/+3
| | | | | | | | | | | There is no real reason to have these separate files any longer. It does mean in meta-toolchain type recipes some extra variables are defined but it also means the common code can be grouped and maintained together which I believe is more beneficial. We therefore merge the classes. (From OE-Core rev: 2cf42b49003494e1b10775523c9a2547eaf16ea4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* do_rootfs: Add PACKAGE_FEED_URIS as a vardepDavid Nyström2014-03-071-0/+1
| | | | | | | | | | | | | A bit uncertain on where to put this, suggestions welcome. Needed to automatically rebuild do_rootfs when PACKAGE_FEED_URIS change. (From OE-Core rev: c779bf78f2e1f66f3c8a6b02054e39bee4ea88a5) Signed-off-by: David Nyström <david.c.nystrom@gmail.com> Signed-off-by: David Nyström <david.nystrom@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (image|rootfs_ipk).bbclass, rootfs.py: ipk multilib fixesLaurentiu Palcu2014-02-131-1/+1
| | | | | | | | | | | This commit whitelists some common directories, so the multilib sanity checks pass and also fixes an issue in lib/oe/rootfs.py when the compared files do not exist. (From OE-Core rev: 4615ac771175cd413f461c081f7d3191c49ccc4b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkgLaurentiu Palcu2014-02-111-30/+1
| | | | | | | | | | | | | | | When using opkg as the PM backend, one has the option to provide custom feeds to create the rootfs from. This commit: * fixes this in the refactored code; * moves the custom config creation code to python; * clean up the package-ipk.bbclass; (From OE-Core rev: 19c538f57c8fa7c566e88a6dbe13ea4826d4f26c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Cleanup image,rootfs_ipk,package_ipk bbclass filesLaurentiu Palcu2014-02-111-106/+3
| | | | | | | | | This commit cleans up the functions that were ported to python. (From OE-Core rev: d950ef40a3eae4b54cc62828e66d84a62d78c447) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: Ensure that BAD_RECOMMENDATIONS are honoured for all architecturesPhil Blundell2014-02-021-7/+1
| | | | | | | | | | | | | | | | | | | | Commit a5362de60c0051f16b88a40bd9cb41915bee0b0f restricted us to writing only a single entry to the status file for any given package. This avoids writing garbage entries (with no Status) when multiple versions of the same package exist in the feed. However, in the case where the same version exists for multiple architectures (for example, has been built for both cortexa15 and generic armv7a), we do need to write out status file entries for all of them since we can't trivially determine which one opkg will decide to install. Fix this by undoing a5362de60c0051f16b88a40bd9cb41915bee0b0f and writing out an entry for everything that matches, but ensuring that we force the Status to the correct value for each one. (From OE-Core rev: 12d7b44c817bdf6eea425bda607379594057c3fb) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: write image manifestPaul Eggleton2013-11-261-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Write a list of installed packages to a .manifest file next to the image, so we can find out what went into the image after it has been constructed without necessarily having to have buildhistory enabled (although that will provide more detail.) We can make use of this for example in the testimage class associated code that checks for installed packages for determining whether or not to run specific tests. Note: this replaces the previous ipk-specific manifest code with something that works for ipk, rpm and deb, and instead of a pruned status file, packages are listed one per line, in the following format: <packagename> <packagearch> <version> Tests for all three backends have shown that the performance impact of this change is negligible (about 1.5s max). Implements [YOCTO #5410] (From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_*.bbclass: List which post-install scripts can not be runJeffrey C Honig2013-11-221-2/+3
| | | | | | | | | | | | When preping a read-only rootfs and finding some post-install scripts that can not be run, list the names of said scripts to avoid having to look around the rootfs to find a list. (From OE-Core rev: 0188120691f433fdccf71b92618115195278c0af) Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* run-postinst: Ensure that the postinsts are orderedMark Hatle2013-10-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The postinst files were being generated using purely the name of the package, this unfortunately meant the run order would be based on the name of the package and not the order in which it was installed on the filesystem. If package A requires package Z to be fully installed, this causes a problem. Note: rpm - as the rpm based install proceeds the order is defined and captured. so the problem is resolved there. ipk - this unfortunately does not appear to solve the problem for ipk, as the status file is not ordered in any appreciable way. This does not cause any regressions however and sets the stage for a proper fix. deb - this -may- fix the deb install. Early testing indicates at least some ordering to the status file. But it's unclear if it completely resolves the issue. (From OE-Core rev: b5bafccb89f45d7cdd515b4ba45e0152ca7922de) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Remove references to _remove in function names since this may ↵Richard Purdie2013-08-261-1/+1
| | | | | | | | | | | | | | become a bitbake keyword There is a good chance we might want to support a bitbake operator "_remove" which works in a similar way to _append and _prepend. As such, we can't use those keywords in function or variable names. (From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPMPaul Eggleton2013-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | Add support for the BAD_RECOMMENDATIONS variable that can be used to prevent specific packages from being installed via an RRECOMMENDS relationship when using the RPM backend. (Previously this functionality was only available when using ipk packaging.) In the process this moves the defaulting of BAD_RECOMMENDATIONS (as empty) to bitbake.conf since it is no longer specific to the ipk backend, as well as unifying some of the code that creates the configuration for smart for use on the host and target. Fixes [YOCTO #3916]. (From OE-Core rev: 4e85129a7d47baf3e32b815cbc277bff84e085a0) 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>
* rootfs_*.bbclass: add some helper functionsLaurentiu Palcu2013-06-111-21/+18
| | | | | | | | | | | | | | | | | | | | This patch adds the following helper functions: * delayed_postinsts - outputs the list of delayed postinstalls; * save_postinsts - this will save the delayed postinstalls for ipk/deb in /etc/(ipk|deb)_postinsts; * rootfs_remove_packages - removes packages from an image; Additionaly, this patch will remove a piece of code in rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for all backends; [YOCTO #4484] (From OE-Core rev: 928df79cd3964f775c4c6e4283ef84b8882f9328) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: implement history collection for SDKsPaul Eggleton2013-03-231-22/+0
| | | | | | | | | | | | | | | | | | | | | | SDKs are constructed in a similar manner to images, and the contents can be influenced by a number of different factors, thus tracking the contents of produced SDKs when buildhistory is enabled can help detect the same kinds of issues as with images. This required adding POPULATE_SDK_POST_HOST_COMMAND and SDK_POSTPROCESS_COMMAND variables so that data collection functions can be injected at the appropriate points in the SDK construction process, as well as moving the list_installed_packages and rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to the package_{rpm,ipk,deb} classes so they can also be called during do_populate_sdk as well as do_rootfs. Implements [YOCTO #3964]. (From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_xxx.bbclass: fix bitbake -S hashes mismatch errorRobert Yang2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitbake -S <image> has errors, e.g.: NOTE: Reparsing files to collect dependency data ERROR: Bitbake's cached basehash does not match the one we just generated (/buildarea/lyang1/poky/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)! ERROR: The mismatched hashes were 8e44f2296f2d6cdf2ccb0236910ef59b and 46357d5e36713646b47b0fe2233e3c8c This is caused by the BUILDNAME which is defined in cooker.py: if not self.configuration.data.getVar("BUILDNAME"): self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M')) The time changes during the first parsing and reparsing, so there is the error, we already have: do_rootfs[vardepsexclude] += "BUILDNAME" but what we need is rootfs_xxx_do_rootfs[vardepsexclude] += "BUILDNAME" The do_rootfs doesn't depend on BUILDNAME directly, but indirectly, the depends tree is: do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME So add BUILDNAME to rootfs_xxx_do_rootfs[vardepsexclude] would fix the problem. [YOCTO #3299] (From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3) 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>
* rootfs_ipkg: fix BAD_RECOMMENDATIONS handlingRoss Burton2013-02-191-3/+7
| | | | | | | | | | | | | | If multiple versions of the same package are in the package feed then the generate status file would only contains a "deinstall" status for the last one, which meant that BAD_RECOMMENDATIONS wouldn't actually work. Use awk instead of grep and stop reading when we reach a newline, so we only ever output a single stanza. (From OE-Core rev: a5362de60c0051f16b88a40bd9cb41915bee0b0f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_(ipk|deb|rpm).bbclass: check package installation status after ↵Laurentiu Palcu2013-02-131-7/+6
| | | | | | | | | | | | | ROOTFS_POSTPROCESS_COMMAND Since the intercept fall-back procedure will change the package installation status, do the checking after ROOTFS_POSTPROCESS_COMMAND ends. (From OE-Core rev: 414c3918baccc2166bba536c956eebaeb49aace3) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk, rootfs_ipk: remove the "set -x"Laurentiu Palcu2013-02-061-1/+1
| | | | | | | | | | | | | Comment the "set -x" lines since these will add a lot of extra, not always necessary, debug messages in the log.do_rootfs. [YOCTO #2599] (From OE-Core rev: 5d8119f3d749073e355351e0e15f2703fad738f2) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ipk: use OPKGLIBDIR in all placesMartin Jansa2013-02-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | * it's not recommended to change this value, because it breaks upgrade path on target (all old u-a alternatives are forgot in old OPKGLIBDIR value * but make it consistent, so if someone really want to change that, then setting OPKGLIBDIR_distro in distro.conf would be enough * without this there were at least 4 places to change: rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond with EXTRA_OECONF option used in opkg recipes package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in package_install_internal_ipk opkg-collateral: value in lists file opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install * validated with buildhistory that without OPKGLIBDIR explicitly set the output is the same and that after setting OPKGLIBDIR_forcevariable := "${libdir}" everything including empty directory from package_ipk is moved to libdir (From OE-Core rev: cf0aa9c4fdae8855803e96b1922d54a2431795d3) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rootfs_*: error out if postinstalls exist with read-only rootfsPaul Eggleton2013-01-181-1/+1
| | | | | | | | | | | | | | | | | If there are postinstall scripts to be run on first boot and IMAGE_FEATURES contains "read-only-rootfs", we know this will fail on the target device so just error out during do_rootfs. This check was already implemented for ipk, so add it to the deb and rpm backends. Also make all backends use bberror rather than just echo to display the error. Fixes [YOCTO #3407]. (From OE-Core rev: 510e377f252dece8850487c30482f83df4a89c7e) 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>
* rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfsMartin Jansa2012-12-191-0/+1
| | | | | | | | | | | | | | | | * I have kernel recipe which depends on other recipe to build tiny initramfs image, without this change it rebuilds not only that initramfs image but also whole kernel when DATE or TIME is changed and OEBasicHash enabled * also resolves ERROR shown when bitbake -S is used for image: ERROR: Bitbake's cached basehash does not match the one we just generated (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)! ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc (From OE-Core rev: a78d2d21fffd646a0d6e0f02a8355be010a7bd28) 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>
* rootfs_ipk/package_ipk: Simplify opkg commandline option variablesRichard Purdie2012-12-071-14/+11
| | | | | | | | | | The current maze of IPKG_ARGS variables is hard to understand and worse, not even used in some places. This simplifies the code and specifies the options in one place. (From OE-Core rev: 5e482b278c3775b0acecc621cf2d3b90ee516f26) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs generation: export two new variables to postinst scriptletsLaurentiu Palcu2012-12-061-0/+2
| | | | | | | | | | | | | | In order for the postinst scriptlets to be able to run once we need to export the location of the intercept scripts and also the location of native sysrootfs. The gdk-pixbuf binaries will need the latter because in order to generate the loaders.cache it will need to scan some shared libraries that must be native. Even though the output is a text file. (From OE-Core rev: 927fabf549bb79cc179d2cb0a953dcd515acf464) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk, package_ipk: drop --force-overwriteMartin Jansa2012-12-031-2/+2
| | | | | | | | | | | | | | | | | | * it was introduced in 2010 by 8c3a7ebac8bed700bcc37f778d5a883cfeee8de8 but doesn't seem needed anymore * also such do_rootfs failure is good indication that runtime packages installed are not sane, ignoring this error in do_rootfs just transfers the issue to end user when he does "opkg upgrade" later on device * tested on SHR images with whole feed included and only issue was gstreamer/gst-plugins-* locale packages (and there is patch for this on oe-core ML) (From OE-Core rev: 1f7d3a2e9071ff78170c06ebf58c7400a5ee09bf) 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>
* rootfs_ipk.bbclass: add missing --force_postinstall optionLaurentiu Palcu2012-11-281-2/+2
| | | | | | | | | | The force_postinstall option was missing and some packages were configured on target rather than on host at rootfs time. (From OE-Core rev: dfadfaa0b38678029ffebe14f15e2dbc148cb1fb) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formatedAndrei Gherzan2012-10-231-3/+3
| | | | | | | (From OE-Core rev: 414822d2caec720319c026324edd59234d0134ff) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files codeAndrei Gherzan2012-10-231-1/+1
| | | | | | | | | | | | While removing packaging data files in rootfs_ipk_do_rootfs use the remove_packaging_data_files function. By using this function we ensure that /var/lib/opkg directory is created. opkg needs this directory to create lock files. (From OE-Core rev: 1f3300766b827ed73daaa01572017775305105b2) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* opkg: Convert select-higher-version option to prefer-arch-to-versionRichard Purdie2012-10-021-2/+2
| | | | | | | | | | This converts the option to maintain the existing behaviour unless the option is specified. We do specify the option during the builds themselves to ensure what the users expects is built. (From OE-Core rev: 0cc479699fe885049625d54c712b500c1b719e75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: Avoid leaving run-postinsts around if online package management ↵Phil Blundell2012-09-241-2/+12
| | | | | | | | | | | | | | is disabled If all postinsts have already been run during rootfs construction then there's no point in having run-postinsts in the installed system. Clean it up at the same time that update-rc.d and suchlike are being removed. (From OE-Core rev: b260cf9fbeb6f029c1ce45e77edd03968caa8288) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: improve performance of image info collectionPaul Eggleton2012-07-291-22/+12
| | | | | | | | | | | Reduce the number of calls to the packaging tool, especially in the case of rpm, using helper utilities to gather the required information more efficiently where possible. (From OE-Core rev: d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rework installation of dev, dbg, doc, and locale packagesPaul Eggleton2012-07-291-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a similar mechanism that was previously used to install locales at rootfs generation time to install other "complementary" packages (e.g. *-dev packages) - i.e. install all of the explicitly requested packages and their dependencies, then get a list of the packages that were installed, and use that list to install the complementary packages. This has been implemented by using a list of globs which should make it easier to extend in future. The previous locale package installation code assumed that the locale packages did not have any dependencies that were not already installed; now that we are installing non-locale packages this is no longer correct. In practice only the rpm backend actually made use of this assumption, so it needed to be changed to call into the existing package backend code to do the complementary package installation rather than calling rpm directly. This fixes the doc-pkgs IMAGE_FEATURES feature to work correctly, and also ensures that all dev/dbg packages get installed for dev-pkgs/dbg-pkgs respectively even if the dependency chains between those packages was not ensuring that already. The code has also been adapted to work correctly with the new SDK-from-image functionality. To that end, an SDKIMAGE_FEATURES variable has been added to allow specifying what extra image features should go into the SDK (extra, because by virtue of installing all of the packages in the image into the target part of the SDK, we already include all of IMAGE_FEATURES) with a default value of "dev-pkgs dbg-pkgs". Fixes [YOCTO #2614]. (From OE-Core rev: 72d1048a8381fa4a8c4c0d082047536727b4be47) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Add support to build the SDK in parallel with the imageMark Hatle2012-07-031-0/+2
| | | | | | | | | | | | | | | | | | When building an image recipe, you can now build a companion SDK by calling the populate_sdk task: bitbake -c populate_sdk core-image-minimal Note: there are still issues w/ the SDK not working completely with multilibs. A lock is required between rootfs and populate_sdk activities to prevent configuration file clashes and similar package management problems in ipk and deb based systems. (RPM already had a lock for a different reason.) (From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rootfs_*: fix splitting package dependency stringsPaul Eggleton2012-05-131-2/+2
| | | | | | | | | | | | | | | | If a + character appears in a version specification within the list of package dependencies, the version will not be removed from the list in list_package_depends/recommends leading to garbage appearing in the dependency graphs generated by buildhistory. To avoid any future problems due to unusual characters appearing in versions, change the regex to match almost any character. Fixes [YOCTO #2451]. (From OE-Core rev: 36d1717e2ad4ca1620ee9f01b524b5ff2f499b26) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: don't echo opkg-cl output to log.do_rootfsMartin Jansa2012-03-301-0/+2
| | | | | | | | | * log_check can find some files with ERR or Fail substring e.g. in "Source: " field (From OE-Core rev: 76c83f107d4a4688a879e30821ab70812052bbdc) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: replace 3 opkg-cl calls with one in get_package_filenameMartin Jansa2012-03-261-3/+4
| | | | | | | | | | * || true is needed for cases where grep doesn't find anything * and quotes around info are needed to keep line breaks (From OE-Core rev: 9a8199e4a0f46ed3e9582143b206144aee28b709) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk.bbclass: fix status file location in rootfsOtavio Salvador2012-02-241-3/+2
| | | | | | | | | This fixes runtime requirement checking and read-only-fs checking. (From OE-Core rev: c50a46fbd50a148146fb1f077db20cdc8121f20b) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: remove runtime_script_required usageMartin Jansa2012-02-011-1/+1
| | | | | | | | | | | | * it was introduced in 87780fc09b066525e47d0f50ee5497db54d304cd * then partially removed in 2feba313c991170747381c7cf821a45c2cd04632 * so remove this use too as runtime_script_required is not initialized anymore and results in run.do_rootfs.6328: line 235: [: -eq: unary operator expected (From OE-Core rev: 6d3eac57bdba8e2582c210a2f82a3a4546f68581) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: implement generic locale package installationPaul Eggleton2012-01-031-21/+9
| | | | | | | | | | | | | | | | | | | | | | Let each package-specific rootfs implementation provide basic functions to query the existence of a package and install a list of packages and then have a generic install function so this logic is in one place. Note: unlike previous versions of this code in OE-Core this uses the IMAGE_LINGUAS variable and not IMAGE_LOCALES - note that IMAGE_LINGUAS was what was used in OE-Classic and it is already used in OE-Core in order to install locale-base-*. This will mean that if IMAGE_LINGUAS is left at the default you will now get more packages installed. If you don't want these language support packages then you should set IMAGE_LINGUAS explicitly. This restores locale installation to the same state as OE-Classic, only we now support all the packaging backends. (From OE-Core rev: c0fc36f8629a6abb9a7b542df8a2857526547a31) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* opkg: Update svn 625 -> 633 and fix preinst issuesRichard Purdie2011-12-161-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a major issue with opkg images at the moment as preinst functions are not being executed before their dependencies are installed and this is leading to corruption of images containing avahi/dbus in particular. There are various changes in upstream opkg in the last 8 revisions which make changes in this area but sadly these aren't enough to get things working for us. I've updated to the latest svn revision with this patch since it makes sense to pull in those changes first and then supplement them with the attached patches. There is a full description of the patches in the patch headers but in summary they: a) Ensure preinst functions execute with their dependencies installed. This is a pretty invasive change as it changes the package install ordering in general. b) Ensure opkg sets $D, not $PKG_ROOT which we don't use c) Change opkg to allow execution of postinstall functions which fail resulting in execution on the target device as rootfs_ipk.bbclass currently does manually. The remaining changes interface this with the rest of the OE build infrastructure, adding in the option to tell opkg to run the preinst and postinst functions, ensure the correct environment is present for the postinst scripts and removing the now unneeded rootfs_ipk class code which opkg now does itself. [YOCTO #1711] (From OE-Core rev: 2feba313c991170747381c7cf821a45c2cd04632) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_ipk: implement FEED_DEPLOYDIR_BASE_URI supportEric Bénard2011-12-081-1/+12
| | | | | | | | | | | | this feature was present in OE-classic, is documented in OE-core but its implementation is actually missing. The present implementation is directly copied from OE-classic and tested on an arm926 machine. (From OE-Core rev: 63b619fd7a3d0ca55a965f0a5b99f6e9c8584ea4) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: add new output history collection classPaul Eggleton2011-12-051-1/+26
| | | | | | | | | | | | | | | | | | | | | | Create a new build output history reporting class, using testlab.bbclass from meta-oe as a base. This records information from images produced by the build process in text files structured suitably for tracking within a git repository, thus enabling monitoring of changes over time. Build history collection can be enabled simply by adding the following to your local.conf: INHERIT += "buildhistory" The output after a build can then be found in BUILDHISTORY_DIR (defaults to TMPDIR/buildhistory). If you set up this directory as a git repository and set BUILDHISTORY_COMMIT to "1" in local.conf, the build history data will be committed on every build. (From OE-Core rev: 14acb530a27a3b088d0bfd56db291f4e72ace8ab) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>