summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* package-deb: Ignore circular dependenciesRicardo Ribalda Delgado2016-03-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package depends on itself apt-get fails to install it with the error attached to this patch. This patch checks for this conditions and notifies the user so the recipe maintainer can fix his RDEPENDS variable. root@qt5022:~# apt-get install perl-module-cpan Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: perl-module-cpan 0 upgraded, 640 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/5964 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] E: Internal error: MaxLoopCount reached in SmartUnPack (2) for perl-module-cpan:amd64, aborting E: Internal error, packages left unconfigured. perl-module-cpan:amd64 root@qt5022:~# apt-get install perl-modules (From OE-Core rev: d8bf148c3b740254ed23d52cf244f0f6e9c7a4ab) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Fix python runtime errorRicardo Ribalda Delgado2016-03-121-2/+2
| | | | | | | | | | | | | | | | The dictionary cannot be used for iteration if its size may change during the loop. ERROR: Error executing a python function in /home/ricardo/curro/qt5022/build-qt5022/repo/yocto/meta/recipes-devtools/perl/perl_5.22.0.bb: Exception: RuntimeError: dictionary changed size during iteration Acked-by: Aníbal Limón <anibal.limon@linux.intel.com> (From OE-Core rev: 04aa40be126e00e2eb97311510e4d3ea90bfe7eb) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Ensure allarch deb packages aren't target specificRichard Purdie2016-02-101-0/+1
| | | | | | | | | | | | The use of TUNE_FEATURES was making do_package_write_deb of allarch packages target specific. To avoid this, only use the end value of DPKG_ARCH for its checksum, not intermediate values or variables. (From OE-Core rev: 65955cf1c7d5c59f29d769a8244ae7c156a43f38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: add 'Multi-Arch: foreign' tag to allarch packagesMatt Madison2016-01-111-0/+2
| | | | | | | | | | | | This tells APT that it can use such packages to resolve dependencies from packages of any architecture in a multilib build. (From OE-Core rev: 7158c79a70e3d820c9701dacfa7206d13f95845a) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass, cross-canadian.bbclass: DPKG_ARCH mapping functionMatt Madison2016-01-111-10/+25
| | | | | | | | | | | | | | | | Have DPKG_ARCH set by directly invoking a mapping function, rather than using an anonymous Python function modify the variable under the hood, so we can have proper handling of overrides. Also bring in some additional mappings to Debian architecture names that weren't being handled. (From OE-Core rev: 8d042ea4e755cb0bb28b88333e10e04ec4e86a36) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bbclass: fix spelling mistakesMaxin B. John2015-11-241-1/+1
| | | | | | | | | | Fix some spelling mistakes in bbclass files (From OE-Core rev: ed484c06f436eea62c5d0b1a2964f219f3e5cb61) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie2015-08-301-0/+3
| | | | | | | | | | | | Changes to OVERRIDES (e.g. from changing MACHINE) should not change the sstate signatures of do_package_write_*. Exclude the variable explicitly in the package classes to avoid this. (From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d) (From OE-Core rev: 59ccabdfb59a3e0917585dafab7a1e7c71330996) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: Allow UTF-8 characters on control filesLeonardo Sandoval2015-08-191-7/+11
| | | | | | | | | | | | | Allow UTF-8 characters on control files. Also handle an expection in case of invalid characters (non UTF-8). [YOCTO #6693] (From OE-Core rev: 4096f3c5d309161999adc996fdfa7526e5504366) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk/deb: Drop version information from RPROVIDESRichard Purdie2015-07-201-1/+2
| | | | | | | | | | | | | | | In some scenarios rpm needs version information from RPROVIDES. We can add this to the metadata where needed however we need to stop it entering the ipk/deb packages. This data is not needed due to the way opkg/dpkg handle the data. This patch ensures that data isn't used. (From OE-Core rev: c68b975693c10899ce50b4d8c2aa3985ca890ce3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-2/+2
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie2015-06-161-1/+1
| | | | | | (From OE-Core rev: 59ca90114fb0b770d9d79e548b7e52aa0c089e48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packaging: allow globs in CONFFILESChen Qi2015-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow globs in CONFFILES. This patch changes the way of CONFFILES handling. After this change, the CONFFILES can take the same form as FILES. That means, we don't have to list a bunch of files for CONFFILES. It will just be expanded like the FILES variable. We don't assume default value for CONFFILES in OE. But distro vendors could provide a default value for CONFFILES in their distro configuration file like below. CONFFILES = "${sysconfdir}" In this way, files under /etc are treated as configuration files by default. Of course, setting CONFFILES in recipes take precedence over the CONFFILES. For example, if the recipe author decides that package A should only treat files under ${sysconfdir}/default/ as config files, he/she can write like this. CONFFILES_A = "${sysconfdir}/default" [YOCTO #5200] (From OE-Core rev: 0d446ef0e5bbca7058eec7259e34f2a1637dfab1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: skip pre/postrm scripts on upgrade, write only one shebangAndreas Oberritter2014-10-111-2/+15
| | | | | | | | | | | | | | | | Trying to upgrade busybox removing symlinks but update-alternatives need these links (sed, cut, tail, etc) in order to work. Adding test to avoid this scripts on upgrade fix the problem, same solution are found in package_rpm class. [YOCTO #6768] (From OE-Core rev: 7b9161dd0c475cca6ea7eb507f7c3c51869eb493) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: Simplify addtaskRichard Purdie2014-03-301-1/+1
| | | | | | | | | The package_write task was previously removed. Remove a remaining superfluous reference to it. (From OE-Core rev: 76bbf9e8f07f3e6f20c890dd4c82c72641e2ca88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Map TARGET_ARCH x86_64 to DPKG_ARCH amd64Ricardo Ribalda Delgado2014-03-111-0/+2
| | | | | | | | | | | | | | | | 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 (From OE-Core rev: a08eacc6d821d6946b23a99bca5abf785875b1cf) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Drop do_package_write taskRichard Purdie2014-02-251-0/+2
| | | | | | | | | | | | | | | | | 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). (From OE-Core rev: cf70e15f063716f3227d467ab1f4bfc0018286f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_*.bbclass: remove references to the old bash indexing routinesLaurentiu Palcu2014-02-141-1/+0
| | | | | | | | | | Package indexing is done in python and package-index.bb uses the new routines. (From OE-Core rev: 2ab1a2bccfbb4ed90fe3b877d1be80817ba32099) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* conf/bitbake.conf: default HOMEPAGE to blank instead of unknownPaul Eggleton2014-02-111-1/+2
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 244e1d73ef58e92d73c098044c66bd784644b933) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_(deb|ipk).bbclass: remove the stamp when creating package from cacheLaurentiu Palcu2014-02-111-0/+5
| | | | | | | | | | 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. (From OE-Core rev: dc06a91144b79a152eb481f6d36f6c328321b7c4) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Activate the new python rootfs/image creation routinesLaurentiu Palcu2014-02-111-146/+0
| | | | | | | | | | | | | | 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); (From OE-Core rev: a83144bac8d67704ff66f5dc0fc56f5b63979694) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_{ipk, deb, rpm}.bbclass: support additional user-defined metadataLeonid Borisenko2014-01-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 773d7352309241e15ef5acadcbe416bdd7d45c18) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Get rid of crazy name mappingRichard Purdie2013-12-181-1/+0
| | | | | | | | | | | | | | | 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. (From OE-Core rev: 5afe86a6854b21692fd97c5fc7fab50dbc068acb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb/package_ipk: Cleanup control file handling/racesRichard Purdie2013-11-061-7/+8
| | | | | | | | | | | 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. (From OE-Core rev: 7f8c728c82a17621461be2114c1afab3713a808e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb, apt.conf: fix apt failure in do_rootfs()Laurentiu Palcu2013-09-241-0/+1
| | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 65a2a1e1d0b0e3dcc34d47f46185f24d753b53dd) 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>
* meta: Don't use deprecated bitbake APIRichard Purdie2013-09-011-2/+2
| | | | | | | | | | 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. (From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDEMark Hatle2013-08-221-4/+13
| | | | | | | | | | | | 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. (From OE-Core rev: 42b115b6d65c8205acb77b96db481f3e5172266b) 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>
* package_deb.bbclass: Use the WORKDIR not SYSROOT for temp filesMark Hatle2013-08-221-7/+10
| | | | | | | | | | | | 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. (From OE-Core rev: 2db14eaa0fcc080bc20fa9da985ffc05c3b21e2a) 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>
* package_deb.bbclass: make DESCRIPTION support newlineRobert Yang2013-07-101-2/+12
| | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 568e303ef4447a9ddb7fb6370166d012a4375dab) 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>
* package_*.bbclass: Drop fakeroot from setscene callsRichard Purdie2013-06-071-1/+0
| | | | | | | | | | | | | 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. (From OE-Core rev: 3c760ce4dc15d85be07aafbfea896e7276e0c2c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class/lib: Fix up various file access methodsRichard Purdie2013-05-091-3/+3
| | | | | | | | | | | | | | There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases (From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: fix 'armel' overrideBogdan Marinescu2013-04-031-3/+5
| | | | | | | | | | | | | | | 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] (From OE-Core rev: 6f86fe5d66e401377bccd9f635270033b99a9f4b) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/populate_sdk: Move functions from package_* to populate_sdk_*Richard Purdie2013-03-231-28/+0
| | | | | | | | | | | 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. (From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: implement history collection for SDKsPaul Eggleton2013-03-231-0/+28
| | | | | | | | | | | | | | | | | | | | | | 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>
* package_{ipk, deb, rpm}: drop the TARGET_OS conditionalChristopher Larson2013-03-221-10/+7
| | | | | | | | | | | 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. (From OE-Core rev: 0fdda5840452c7715ed775d5d18d9f850396f483) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: don't install glibc-localedata-i18n separatelyChristopher Larson2013-03-221-4/+0
| | | | | | | | | | 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. (From OE-Core rev: e9485c7077e5a9508371bbbbebdaaf1e9685da61) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: set DPKG_ARCH_arm to "armel"Constantin Musca2013-03-101-0/+1
| | | | | | | | | | | - the system should be using "armel" by default, not "arm" [YOCTO #3741] (From OE-Core rev: 74c671a609172a3801e53fe93e2853c4f0eb93b1) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdkHongxu Jia2013-03-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: a66ed54490305380c549838f9a580528d5b49275) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass:fix the arch (replace "_" with "-") in deb package controlHongxu Jia2013-03-021-0/+8
| | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 8487b352cabd8c8ae8a7d9e7e66489e4e964bd50) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb: check CONFFILES exist before adding them to metadataRoss Burton2013-02-221-1/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: 767a3d1c45f97add720174a7034df750bfb09a8e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm/dev/ipk/tar: Drop unused functionsRichard Purdie2013-02-171-51/+0
| | | | | | | | | | | 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. (From OE-Core rev: 3684036213c9b1c27389260b7a1e3441c6bd659d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm/deb/ipk: Error if we don't find packages when creating the ↵Richard Purdie2013-02-171-1/+6
| | | | | | | | | | | | | | | 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. (From OE-Core rev: 721ef058b37604e100021ec7a90ad2f745d83916) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 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>