aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
AgeCommit message (Collapse)Author
2014-03-28package_*.bbclass: Simplify addtaskRichard Purdie
The package_write task was previously removed. Remove a remaining superfluous reference to it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11package_deb: Map TARGET_ARCH x86_64 to DPKG_ARCH amd64Ricardo Ribalda Delgado
Without this patch packages are generated as x86_64. Which cannot be installed by default. root@qt5022:~# dpkg -i alsa-utils_1.0.27.2-r0_x86-64.deb dpkg: error processing alsa-utils_1.0.27.2-r0_x86-64.deb (--install): package architecture (x86-64) does not match system (amd64) Errors were encountered while processing: alsa-utils_1.0.27.2-r0_x86-64.deb Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-24package: Drop do_package_write taskRichard Purdie
The reasons this task was introduced are lost in the mists of time. It allowed for the a single "package_write" task instead of spelling out the explicit package backends, however in all but one case we do that anyway. As such as might as well give in and delete the task, converting that single reference into explicit dependencies. This gives bitbake a bit less work to to when processing the runqueue since there are less tasks (but more dependencies in some cases). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_*.bbclass: remove references to the old bash indexing routinesLaurentiu Palcu
Package indexing is done in python and package-index.bb uses the new routines. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11conf/bitbake.conf: default HOMEPAGE to blank instead of unknownPaul Eggleton
The default value for HOMEPAGE of "unknown" has been in place since the early OE-Classic days, but it doesn't really make sense - "unknown" is not a valid URL and it just means we have to explicitly check for this hardcoded string if we're displaying the value in some form of UI, such as Toaster. This has required some changes to the packaging classes as they previously did not expect the value to be blank. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11package_(deb|ipk).bbclass: remove the stamp when creating package from cacheLaurentiu Palcu
If the packages are created from cache, we need to remove the stamp so that we re-generate the index files at do_rootfs time. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11Activate the new python rootfs/image creation routinesLaurentiu Palcu
This commit will: * remove old bash code common to all backends; * create a new do_rootfs() python function that will use the new rootfs/image creation routines; * allow creation of dpkg based images; * fail for rpm/opkg (not implemented yet); Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-01-28package_{ipk, deb, rpm}.bbclass: support additional user-defined metadataLeonid Borisenko
Additional metadata from user-defined variable is written into control/spec file of binary package. Three variables are searched for adiitional package metadata: * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN> * PACKAGE_ADD_METADATA_<PKGTYPE> * PACKAGE_ADD_METADATA First found variable with defined value wins. <PN> is a package name. <PKGTYPE> is a distinct name of specific package type: * IPK for .ipk packages * DEB for .deb packages * RPM for .rpm packages Variable can contain multiple [one-line] metadata fields separated by literal sequence '\n'. Separator can be redefined through variable flag 'separator'. In package control/spec file separator is replaced by newline character. Signed-off-by: Leonid Borisenko <ive.found@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-12-18sstate: Get rid of crazy name mappingRichard Purdie
When originally developed, it was thought a task may have more than one associated sstate archive. The way the code has grown that idea is now not possible or needed. We can therefore assume one sstate archive per task and drop the crazy name mapping code. Simpler is better in this case. The downside is that various sstate archives will change name so this forces a cache rebuild. Given the other sstate changes going in at this time, this isn't really a bad thing as things would rebuild anyway. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06package_deb/package_ipk: Cleanup control file handling/racesRichard Purdie
If you Ctrl+C ppackage_write_{deb/ipk} control files can get left lying around and make it into another packaging format. This ensures we cleanup all known control files before starting packaging. We can simplify some of the globbing as a result. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24package_deb, apt.conf: fix apt failure in do_rootfs()Laurentiu Palcu
The changes in this commit, dc5f6c3898555b59f16bf809ae4c5418656e6ac9, moved apt config directory from native SYSROOT to WORKDIR. Unfortunately, Dir::Etc in apt.conf was not changed accordingly and sources.list file could not be found during do_rootfs(). This commit fixes this issue. [YOCTO #5241] 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>
2013-09-01meta: Don't use deprecated bitbake APIRichard Purdie
These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDEMark Hatle
Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE. Also add a warning that ensures users know that BAD_RECOMMENDATIONS support is not implemented in the debian package/rootfs classes. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-22package_deb.bbclass: Use the WORKDIR not SYSROOT for temp filesMark Hatle
Previous debian APT configuration was using the sysroot directory. This not only polluted the sysroot, but violates the expectation that the sysroot is not modified by the rootfs installation. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09package_deb.bbclass: make DESCRIPTION support newlineRobert Yang
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it support newline ("\n") to let the user can wrap it manually, e.g.: DESCRIPTION = "Foo1\nFoo2" In the past, it would be: Foo1\nFoo2 Now: Foo1 Foo2 [YOCTO #4348] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07package_*.bbclass: Drop fakeroot from setscene callsRichard Purdie
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b however the package_write tasks sstate only consists of package files and no fakeroot privileges are needed to write these out, only originally create them. We can therefore drop these for some small performance gains and a less convoluted depenency chain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09class/lib: Fix up various file access methodsRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03package_deb.bbclass: fix 'armel' overrideBogdan Marinescu
The 'armel' override for DKPG_ARCH was causing the meta-toolchain build to fail. The assignment was moved to an anonymous fragment of Python code, so it doesn't affect the assignments in cross-canadian.bbclass anymore, thus fixing the issue. [YOCTO #4080] Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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-03-22package_deb: don't install glibc-localedata-i18n separatelyChristopher Larson
This was removed from package_rpm and package_ipk years ago, and shouldn't be needed, installing the packages from package_linguas should be sufficient. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-09package_deb.bbclass: set DPKG_ARCH_arm to "armel"Constantin Musca
- the system should be using "armel" by default, not "arm" [YOCTO #3741] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdkHongxu Jia
When build meta-toolchain-sdk in a newly created environment, there is an error: ... packagegroup-core-standalone-gmae-sdk-target set to manually installed. You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: avahi-dev: Depends: avahi (= 0.6.31-r6.1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ... In this case, avahi was installed and then removed by dpkg (the reason is unknown, only with log `Noting disappearance of avahi, which has been completely replaced'), the uninstall was done by dpkg rather than apt, and apt detected the package dependency was broken, so apt-get install failed. Use `apt-get install -f' to correct the upper broken dependencies in place. The removed avahi will be reinstalled. [YOCTO #3720] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-02package_deb.bbclass:fix the arch (replace "_" with "-") in deb package controlHongxu Jia
when build deb image, such as building meta-toolchain-sdk in x86_64 host, there is warning like that: ... 'x86_64' is not a valid architecture name: character `_' not allowed (only letters, digits and characters `-') ... The params in deb package control file don't allow character `_', only letters, digits and characters `-' allowed. Change the arch's "_" to "-" in the deb package's control file at the control file creation time. Such as `x86_64'-->`x86-64' [YOCTO #3721] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22package_deb: check CONFFILES exist before adding them to metadataRoss Burton
dpkg-deb 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-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-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-06package_deb: Dependencies with a ( or ) in them are invalid in debsMark Hatle
Replace ( or ) with __. This allows RPM style dependencies to be satisfied in deb style packages. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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-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-07-26classes/package_deb: add PackageArch fieldPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-19Convert tab indentation in python functions into four-spaceRichard 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-07-02package_deb: When searching for E:, anchor expressionRichard Purdie
If we don't do this it will match on expressions like "NOTE:" which are not fatal errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-11classes/package_deb: create .gz index instead of .bz2Paul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` 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>
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-09-21deb packages support: switch from /var/dpkg to /var/lib/dpkgDexuan Cui
[YOCTO #1086] The pach was backported from OE: http://git.openembedded.net/cgit.cgi/openembedded/commit/?id=41e0fbf792037f249d1b8d283b3de81718887c9f Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-09-15package_deb.bbclass, populate_sdk_deb.bbclass: fix meta-toolchain-gmae buildDexuan Cui
[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. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-09-07package_deb.bbclass: put the stderr into log.do_xxx-attemptonly.xxxDexuan Cui
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. Signed-off-by: Dexuan Cui <dexuan.cui@intel.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>