summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* package_ipk/deb/rpm: Ensure deploy staging directory is empty before ↵Richard Purdie2013-01-301-0/+1
| | | | | | | | | | | rerunning task If we don't do this, stale files can build up, particularly with the PR server. (From OE-Core rev: c30ae39229b35d72e2205040d76754b5120fa878) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Split do_packagedata task from do_packageRichard Purdie2013-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Dependencies with a ( or ) in them are invalid in debsMark Hatle2012-12-061-0/+10
| | | | | | | | | | | Replace ( or ) with __. This allows RPM style dependencies to be satisfied in deb style packages. (From OE-Core rev: 12acb6bb00ba665571fcfbdb0ef4668ca0a98d5b) 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: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie2012-10-021-10/+11
| | | | | | | | | | | | | | | | | 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>] (From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb/ipk: Remap < and > to << and >>Mark Hatle2012-10-021-0/+18
| | | | | | | | | | | In deb and ipk, < means <=, while > means >=... there is a different operator << and >> that means < and >, so we map them when constructing the packages. (From OE-Core rev: bbcc78d8ff03725ce5b3b65ce24025c3da45f2ab) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan2012-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_deb: add PackageArch fieldPaul Eggleton2012-07-261-0/+1
| | | | | | | | | | | | | If we want to query the PACKAGE_ARCH from the installed package (as we do in order to be able to do a pkgdata lookup for example) then we need to have this stored in its own field as this is not always the same as the Architecture field for deb packages. (From OE-Core rev: 3f4f6726646e18ae21919e2f361b669332796aef) 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>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-2/+2
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Fix manual log file pathsMark Hatle2012-07-031-2/+2
| | | | | | | | | | | | 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. (From OE-Core rev: 779db325d407f0bade84572ef99fdad4d0c88011) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: When searching for E:, anchor expressionRichard Purdie2012-07-021-1/+1
| | | | | | | | | If we don't do this it will match on expressions like "NOTE:" which are not fatal errors. (From OE-Core rev: 8f4e160ce0b0c755545d62b06db14decd45b9f1e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.system with subprocess.callRobert Yang2012-05-301-1/+2
| | | | | | | | | | | | | | | 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] (From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie2012-05-111-1/+1
| | | | | | | | | | | | | | 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. (From OE-Core rev: 74daad03ca29a03b0005f7d2b90a0347d5b583a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_deb: create .gz index instead of .bz2Paul Eggleton2012-04-111-1/+1
| | | | | | | | | | | | | | | | | apt is looking for Packages.gz files instead of the .bz2 files we are currently creating and failing when they cannot be found. It is not immediately obvious how to make the current version use the .bz2 indexes; thus create .gz indexes for now which allows us to successfully create images. Tested on both a Fedora 14 and an Ubuntu 11.10 host machine. Fixes [YOCTO #1858]. (From OE-Core rev: 518f4af617f91b209086acb51454393147aa92dd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_{deb,ipk,rpm}: apply umask to files generated in ↵Andreas Oberritter2012-04-041-0/+1
| | | | | | | | | | | | do_package_write_{deb,ipk,rpm} * Explicitly set umask to 022. Otherwise the build system's umask may leak into the image. (From OE-Core rev: d2a54427481856238bdfec9723cf575088320512) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie2012-03-051-1/+1
| | | | | | | | sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie2012-03-051-4/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* getVar/setVar cleanupsRichard Purdie2011-11-271-2/+2
| | | | | | | | | Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. (From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-41/+41
| | | | | | | | | | | | | | | | | This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* deb packages support: switch from /var/dpkg to /var/lib/dpkgDexuan Cui2011-09-211-5/+5
| | | | | | | | | | | | [YOCTO #1086] The pach was backported from OE: http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f (From OE-Core rev: d1e6f49a6473df3c626100ba01b27485f735c33b) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass, populate_sdk_deb.bbclass: fix meta-toolchain-gmae buildDexuan Cui2011-09-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #1070] Currently with deb packaging, we have 2 issues when running "bitbake meta-toolchain-gmae". 1) when MACHINE="qemux86", SDKMACHINE="i686", INSTALL_BASEARCH_DEB is "i686", too. This causes the following ERROR: | E: Couldn't find package task-sdk-host-nativesdk NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed This is becasue: due to the DPKG_ARCH mapping, we create such a deb package tmp/deploy/deb/i686-nativesdk/task-sdk-host-nativesdk_1.0-r10_i386.deb; dpkg can't recoginze the package. We need to map INSTALL_BASEARCH_DEB in the same way. 2) when MACHINE="qemux86", SDKMACHINE="x86_64", INSTALL_BASEARCH_DEB is "x86_64", too. We get such an ERROR: | E: Couldn't find package task-cross-canadian-i586 NOTE: package meta-toolchain-gmae-1.0-r6: task do_populate_sdk: Failed This is because: dpkg can't recognize the generated package tmp/deploy/deb/x86_64-nativesdk/task-cross-canadian-i586_1.0-r0_i386.deb Here the "i386" suffix is incorrect and should be "x86_64" -- the i386 comes from the line DPKG_ARCH_i586 ?= "i386" in package_deb.bbclass. However, for canadian package, actually here the overriding of DPKG (from "x86-64" to "i386") should not happen -- it accidently happens just because TARGET_ARCH exists in OVERRIDES. We can move the overriding logic to the anonymous python function to work this around. (From OE-Core rev: 63010b9ee89643c8e83656783231f0a7848d9e45) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxxDexuan Cui2011-09-071-1/+1
| | | | | | | | | | | | | | | Currently the stderr msgs go into log.do_rootfs and can cause a fatal failure in "log_check rootfs". However, the err msg could be spurious since we *only attempt* to install the the packages, which may not exist actually. E.g., without this patch, we can get a fatal ERROR due to E: Couldn't find package task-core-tools-dev. (From OE-Core rev: 5f00bda874ccaebdb00714b5cb5227462d43f8fb) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add SDK_PACKAGE_ARCHSMark Hatle2011-08-021-5/+1
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 587c1d5bac71fa6faa65ee3a271391cbf931e8f7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_{deb, rpm, ipk}.bbclass: fix 'lingusa' typoKoen Kooi2011-08-011-3/+3
| | | | | | | (From OE-Core rev: 5e22d7d1fea7dfb14380de5692e4b2940781b518) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package_xxx.class: Use PKGE/PKGV/PKGR.Lianhao Lu2011-05-271-4/+4
| | | | | | | | | Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx. (From OE-Core rev: c2872315905fcdf6e4bf11fe96e5ca62af3475f8) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package-index.bb: add support for deb and rpm.Dexuan Cui2011-05-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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. (From OE-Core rev: 01e34bdb43e0cc27c1cfffd6730c384f40c404c1) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: Place the whole task under fakeroot context to fix ↵Richard Purdie2011-02-221-1/+3
| | | | | | | | | | build failures If we don't do this, the ipk/rpm backends can create temporary files and then when the deb package creates new files, those inodes can be reused and permission confusion results. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_deb/package_deb.bbclass: move func from rootfs_deb to package_debLianhao Lu2011-02-011-0/+125
| | | | | | | | | | | | | | | package_deb.bbclass: 1. Added new function package_update_index_deb() to generate package index files. 2. Added new function package_install_internal_deb() to install a list deb packages to a specified root directory, with the specified package architecutre information. rootfs_deb.bbclass: Used the above new functions to install the rootfs. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().Lianhao Lu2011-01-311-0/+20
| | | | | | | 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>
* package_deb: Remove access to the D directory which isn't used and might not ↵Richard Purdie2011-01-211-7/+2
| | | | | | exist (same problem as the previous patch to package_ipk fixes) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: The packaging command itself is run under fakeroot so these ↵Richard Purdie2010-10-221-2/+0
| | | | | | lines are totally unneeded Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* classes: Only enable fakeroot on setscene tasks with packagingRichard Purdie2010-10-221-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* pseudo/fakeroot: Move the pseudo directory creation into bitbakeRichard Purdie2010-10-221-0/+1
| | | | | | | | | | | | | | 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>
* package_deb: Fix a typo meaning the debian packaging was not running in the ↵Richard Purdie2010-10-221-1/+1
| | | | | | fakeroot evnironment Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add Summary/Description support to packagingMark Hatle2010-10-111-1/+13
| | | | | | | | | | | | [BUGID #281] Add the ability for the deb, ipk and rpm classes to use the new summary and description fields. The Description is wrapped around 75 characters to ensure a reasonably nice, presentable description. (Summary defaults to the description if Summary is not defined.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* Revert "classes: Disable setscene tasks for initial testing"Richard Purdie2010-10-051-1/+1
| | | | This reverts commit 084ec86402bba92418898a4c47667a0574a3b3ee.
* meta/classes: Fix whitespace mismatch and broken functionsRichard Purdie2010-08-311-9/+9
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* classes: Disable setscene tasks for initial testingRichard Purdie2010-08-191-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* package_*.bbclass: Always run these tasks under fakerootRichard Purdie2010-08-191-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* package_(deb|rpm): Update to use packaged-staging2Joshua Lock2010-08-191-3/+15
| | | | Signed-off-by: Joshua Lock <josh@linux.intel.com>
* package_deb.bbclass: Make sure the controldir is always cleaned outRichard Purdie2010-07-221-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Use pseudo rather than fakeroot for fake root privilegesJoshua Lock2010-07-161-2/+2
| | | | | | | Make use of the ability to configure the fake root provider and use Wind River's pseudo utility. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* package_*.bbclass: Only set pkg in overrides. These are the only values ↵Richard Purdie2010-07-071-5/+1
| | | | | | we're interested in expanding and this makes sure we obtain the expected data Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Revert "classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when ↵Richard Purdie2010-07-071-1/+1
| | | | | | | packaging" This reverts commit 3abe7a0624e1215124799f97c872682a98659760 which was incorrect in some assumptions about OVERRIDE handling order.
* package_deb.bbclass: Fix packaging functions to use versioned dependency ↵Richard Purdie2010-07-021-35/+39
| | | | | | package functions correctly Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when packagingJoshua Lock2010-07-011-1/+1
| | | | | | | | | The OVERRIDES variable was being incorrectly set with the end result of the runtime dependencies of the package not being encoded in it's package metadata. This broke opkg-native in meta-toolchain. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* classes/package_ipk|_deb.bbclass: Make sure versions correctly make it into ↵Richard Purdie2010-06-301-10/+10
| | | | | | | | | | output packages The version information part of package dependency strings was not ending up in the output packages correctly. This patch fixes this and ensures the version information isn't lost. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the ↵Richard Purdie2009-11-131-2/+2
| | | | | | | | | | | | | populate_staging task to populate_sysroot This change makes the purpose of the staging directory more obvious and the taskname more true to what it now actually does. The layout version number is increased due to the change in layout but code to convert existing directories and insert a symlink for backwards compatibility is included. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* classes: Remove and sanitise import statementsRichard Purdie2009-11-131-7/+4
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* base.bbclass: Use explode_deps from bb.utils and remove the obsolete ↵Richard Purdie2009-02-051-2/+2
| | | | base.bbclass version
* package_ipk/package_deb.bbclass: Make sure control files are properly ↵Richard Purdie2008-08-181-11/+1
| | | | | | removed fixing problems with files leaking into packages. Use core bitbake function for directory pruning git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5066 311d38ba-8fff-0310-9ca6-ca027cbcb966