summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_ipk.bbclass
AgeCommit message (Collapse)Author
2013-04-18package_ipk: Ensure the status file existsRichard Purdie
The postinstall for the opkg run-postinst hook checks for the existence of this file. We therefore ensure it always exists during image generation. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23package/populate_sdk: Move functions from package_* to populate_sdk_*Richard Purdie
This fixes build failures introduced with "classes/buildhistory: implement history collection for SDK" by moving the functions to files where only the specific image type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES were enabled. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23classes/buildhistory: implement history collection for SDKsPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22package_{ipk, deb, rpm}: drop the TARGET_OS conditionalChristopher Larson
The tclibc file for uclibc already empties IMAGE_LINGUAS, so there's no point to this conditional as far as I can tell, and it can cause issues for certain values of TARGET_OS. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17package_rpm/dev/ipk/tar: Drop unused functionsRichard Purdie
The package_xxx_install functions date from a different era and are not used by anything. In the rpm case, they're simply unimplemented, in the tar case they're using broken whitespace and deprecated functions. We might as well clean out the old broken unused code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17package_rpm/deb/ipk: Error if we don't find packages when creating the ↵Richard Purdie
package index If for whatever reason the package directory is empty of packages, it makes sense to error early rather than later in what become much more obtuse errors. This adds in a sanity check to each of the packaging backends. It also removes the duplicate createrepo call since the core index creation function now uses this directly after the switch to smart. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15package_ipk: check CONFFILES exist before adding them to metadataRoss Burton
opkg-build verifies that conffiles exist, so verify that the specified files actually exist before writing them to conffiles. This mirrors the behaviour of FILES and package_rpm's CONFFILES handling. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06package_ipk, rootfs_ipk: remove the "set -x"Laurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06ipk: use OPKGLIBDIR in all placesMartin Jansa
* 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2013-01-30package_ipk/deb/rpm: Ensure deploy staging directory is empty before ↵Richard Purdie
rerunning task If we don't do this, stale files can build up, particularly with the PR server. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25Split do_packagedata task from do_packageRichard Purdie
Currently, do_rootfs has a dependency on all the do_package output being present due to its usage of the pkgdata directories. This means that if you run: bitbake xxxx-image -c rootfs you end up having to fetch and unpack all the do_package data which is usually large and inefficient. It also means rm_work has to leave all the do_package data lying around so rootfs works. This patch splits the actual creation of the pkgdata directory off into a separate task, "packagedata" which happens immediately after do_package. We can then remap the dependencies so this task is depended upon, not do_package. Sstate can then be programmed not to require do_package at the appropriate times. Whilst this patch doesn't do so, it opens the possibility of rm_work wiping out the do_package output from WORKDIR as long as it also removed the do_package stamp (both normal and setscene variants) and allowing more space savings with rm_work which has been regularly requested. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07rootfs_ipk/package_ipk: Simplify opkg commandline option variablesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03rootfs_ipk, package_ipk: drop --force-overwriteMartin Jansa
* 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) 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>
2012-10-02opkg: Convert select-higher-version option to prefer-arch-to-versionRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02classes: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie
The bb.utils.explode_dep_versions function has issues where dependency information can be lost. The API doesn't support maintaining the correct information so this changes to use a new function which correctly handles the data. This patch also fixes various points in the code to ensure that we do not have any duplicates in things that use explode_dep_versions. A new sanity test to test the contents of the R* variables is also added. [Some changes from Mark Hatle <mark.hatle@windriver.com>] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02package_deb/ipk: Remap < and > to << and >>Mark Hatle
In deb and ipk, < means <=, while > means >=... there is a different operator << and >> that means < and >, so we map them when constructing the packages. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26package_ipk: Remove spurious '-i' in grep command for log_checkPhil Blundell
ipk_log_check uses a case-sensitive grep (which is correct) when deciding whether there were any errors or not. But if it decides that there were, it then uses a case-insensitive grep to display them. This results in a large amount of irrelevant and confusing output which makes it hard to see the real errors amongst the noise. Suppress this by removing the unwanted -i. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define any options and furthermore allows 'echo -e' to be the default behavior. This means that in dash 'echo -e' will actually print '-e' and interpret backslashes by default. We use instead 'printf' builtin command with or without '\n' to simulate 'echo -e' or 'echo -n'. 'printf' needs format while 'echo' can be used without any arguments. So 'echo >' was replaced by 'printf "" >'. 'echo' without '-n' flag adds a new line by default so to keep the same behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is used. [YOCTO #3138] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21meta/classes: Various python whitespace fixesRichard Purdie
It was pointed out we have a number of weird indentations in the python functions. This patch cleans up 3, 7 and other weird indentations for the core bbclass files. It also fixes some wierd (odd) shell function indentation which my searches picked up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19package_ipk.bbclass: Fix python whitespaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03Fix manual log file pathsMark Hatle
When a recent change, the path to log files may be contained within an arbitrary directory. To generate the manual log files in the correct path we should be using the ${BB_LOGFILE}'s path instead of always assuming the logs go into ${WORKDIR}/temp. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-05-30meta: replace os.system with subprocess.callRobert Yang
Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie
The usage of this function renaming and it being called using bb.build.exec_func() causes needless indirection loops, confusing log files and seems generally pointless. This simplification makes the process much simpler and faster. I can't come up with a good reason why the export_functions functionality is needed for this function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-06package_ipk.bbclass: fixing muttilib prefix extracting.Lianhao Lu
Fixed an error in multilib prefix extracting. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2012-04-06package_ipk: don't generate Packages.filelistMartin Jansa
* it works only with 'new' packages and with fixed opkg-utils it will unpack *all* packages, because filelist doesn't support 'cache' like Packages does Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-04package_{deb,ipk,rpm}: apply umask to files generated in ↵Andreas Oberritter
do_package_write_{deb,ipk,rpm} * Explicitly set umask to 022. Otherwise the build system's umask may leak into the image. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-03-08package_ipk.bbclass: Ensure Source is set to something else packaging can failRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05image-mklibs/package_ipk: Remove bashismsRichard Purdie
We now support using dash but these bashisms triggered build failures for me when using it. This replaces the code with something which works on dash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16opkg: Update svn 625 -> 633 and fix preinst issuesRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08multilib: Drop MULTILIB_IMAGE_INSTALLDongxiao Xu
There should just be a single IMAGE_INSTALL variable. If the package backends need this split into different multilib components they should be responsible for doing this, not the user. This commit removes the MULTILIB_IMAGE_INSTALL variable. [YOCTO #1564] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-01package_ipk: There is no longer any need to force owners/groups to rootRichard Purdie
Since the packaging process is run under pseudo, the default user is now root so there is no longer any need to hardcode this. Also take this opportunity to move the variable to package_ipk.bbclass since this is the only user of it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16debian/_ipk.bbclass: Added multilib support for package_name_hook()Lianhao Lu
[YOCTO #1486] 1. Added multilib support for package_name_hook() so MLPREFIX is kept in the final package name. 2. clean the output of log_check_ipk. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-08-16package(_ipk).bbclass: opkg using ALL_MULTILIB_PACKAGE_ARCHSLianhao Lu
[YOCTO #1345] The new variable ALL_MULTILIB_PACKAGE_ARCHS contains all the values of PACKAGE_ARCHS for each multilib variants. The opkg backend now uses this new value insteald of the PACKAGE_ARCHS to update the opkg indexes and to generate the opkg configuration files. This allows the normal packages and multilib packages may be installed into the same rootfs. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-08-02package_ipk: SDK generation workaroundMark Hatle
During SDK generation the multilib_sanity_check function is being called, however it is not available unless we've been called from the image.bbclass. Disable the check if MULTILIB_CHECK_FILE (also set in image.bbclass) doesn't exist or is empty. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-02bitbake.conf: Add SDK_PACKAGE_ARCHSMark Hatle
Add SDK_PACKAGE_ARCHS to avoid the sed operations we were previously doing inside of the variouns populate_sdk functions and related items. Also add documentation to populate_sdk to explain when the various functions are expected to be doing. Finally fix a bug in populate_sdk_rpm where the wrong value was being set, noticed while working on this change. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-01package_{deb, rpm, ipk}.bbclass: fix 'lingusa' typoKoen Kooi
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2011-07-27package(rootfs)_ipk.bbclass: support multilib in opkg backend.Lianhao Lu
Support install multiple multilib in opkg backend. The installation is done in 3 phases. Phase 1: install normal packages to IMAGE_ROOTFS. Phase 2: install multilib packages under MULTILIB_TEMP_ROOTFS. Packages belongs to the same multilib arch would be installed to a unique directory. Phase 3: check file confliction between IMAGE_ROOTFS and MULTILIB_TEMP_ROOTFS, install multilib packages to IMAGE_ROOTFS only if the sanity check passed. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-07-14package_ipk: add License field to control fileKoen Kooi
Port of oe.dev Revision e35d1ffad1553f259b084578992f15d10f590f98 Signed-off-by: Koen Kooi <koen@openembedded.org> Signed-off-by: Khem Raj <raj.khem@gmail.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27classes/package_xxx.class: Use PKGE/PKGV/PKGR.Lianhao Lu
Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-05-20package-index.bb: add support for deb and rpm.Dexuan Cui
[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>
2011-02-01rootfs_ipk/package_ipk.bbclass: Move func from rootfs_ipk to package_ipkLianhao Lu
package_ipk.bbclass: Added new function package_install_internal_ipk() to install a list of ipk packages to a specified root directory, with the specified package architecutre information. rootfs_ipk.bbclass: Used the above new functions to install rootfs. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-31image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().Lianhao Lu
Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant package_xx.bbclass. (Where xx is rpm/ipk/deb). Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-21package_ipk: Do not depend on the existence of "D" to create ipk packageDongxiao Xu
If build from sstate results, the ${D} will not be installed. In this case the creation of ipk package will be skipped, which will cause the build failure. Fix the issue by removing the judgement of ${D} existence. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2010-12-10cross-canadian: Update after PN changes to include TARGET_ARCHRichard Purdie
This patch massively simplifies the canadian packaging and allows multiple toolchain targets to be parallel installed into the same nativesdk sysroot without package name conflits. Since we now do this, we can simplify cross-canadian to become more like nativesdk. This is a first pass over this task, similar changes would be desireable to cross and the whole MULTIMACH_ARCH mess can then probably be similified much further. Signed-off-by: Richgard Purdie <rpurdie@linux.intel.com>
2010-10-22classes: Only enable fakeroot on setscene tasks with packagingRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22pseudo/fakeroot: Move the pseudo directory creation into bitbakeRichard Purdie
If sstate was used to accelerate a build, the pseudo directory might not have been created leading to subsequent task failures. Also, sstate packages were not being installed under pseudo context meaning file permissions could have been lost. Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures exists before running tasks and running the appropriate setscene tasks under fakeroot context. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>