summaryrefslogtreecommitdiffstats
path: root/meta/classes/debian.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-06debian: Fix renaming packagedata dependenciesRichard Purdie
We've recently seen issues where libxkbcommon was changed in/out of debian renaming and weston which DEPENDS but doesn't RDEPEND on it would show build failures. Looking at the sigdata file for weston:do_package_write_XXX, there were dependencies on packagedata for RDEPENDS but not DEPENDS. Some items like libxkbcommon are in DEPENDS but become autodetected RDEPENDS. The debian class already handles RDEPENDS but needs to handle DEPENDS in a similar way to avoid failures since bitbake treats them as two separate namespaces (unlike recrdepends). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14meta: Fix Deprecated warnings from regexsRichard Purdie
Fix handling of escape characters in regexs and hence fix python Deprecation warnings which will be problematic in python 3.8. Note that some show up as: """ meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence \.   """ where the problem isn't on 1293 in package.bbclass but in some _prepend to a package.bbclass function in a different file like mesa.inc, often from do_package_split() calls. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-17classes/debian: clean up process spawningRoss Burton
This code is old and was of it's time, rewrite it to use modernish (we support Python 3.4, so can't use subprocess.run()) subprocess and re idioms instead. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-17classes/debian: fix library path handlingRoss Burton
The existing code is looking for libraries in all paths which end in ${libdir}. This caused false-positives for recipes such as lz4 which had files called /usr/lib/lz4/ptest/usr/lib/liblz4.so, and resulted in lz4-ptest being incorrectly renamed to liblz4. Solve this by explicitly looking for ${libdir} etc under the packages-split directory. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-06debian.bbclass: add a note when a package is renamedRoss Burton
To make it easier to debug problems with renaming caused by debian.bbclass, explicitly log when packages are renamed. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-13debian: Fix superfluous setting for RPROVIDESRichard Purdie
PKG_ can be set to something like ${MLPREFIX}<name> and the lack of expansion here means the case where MLPREFIX is empty leads to a bogus RPROVIDES. Use expansion of the variable to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20debian: Add versions to RPROVIDESRichard Purdie
Recently, libspeexdsp-dev added RCONFLICTS = "speex-dev < 1.2rc2". where libspeexdsp is 1.2rc3. That all seems reasonable, except there is a problem. debian.bbclass renames speex-dev to libspeex-dev and adds a "Provides: speex-dev" which the packaging backends duly note. The trouble is rpm sees that as having no version at all. This means that "speex-dev < 1.2rc2" conflicts with "speex-dev" and the -dev package simply cannot be installed. We can't simply version all Provides for rpm since some dependencies clearly shouldn't be versioned (e.g. the locale ones). The solution that seems to work best is to add the versions in debian.bbclass. If the backend doesn't like these, the backend can then strip them off (separate patch does this). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23debian: Set RPROVIDES to include the original packagename when renamingRichard Purdie
Currently its hard for a packagegroup recipe to depend on something who's name can change unpredictably. We therefore add in RPROVIDES for the original package name so that these are also available to use as dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23bitbake.conf/debian.bbclass: Move AUTO_LIBNAME_PKGS definition to class fileRichard Purdie
Might as well move this default to the class which uses it allowing for easier reading/understanding of the class. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-25debian.bbclass: inherit packageRoss Burton
This class defines a package_name_hook implementation but as EXPORT_FUNCTIONS is order-dependent it needs to inherit package.bbclass first to ensure that the "base" definition in there is defined first, otherwise with a suitable inherit order of debian and then a packaging class can result in the stub package_name_hook being incorrectly used. 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>
2013-02-01package: Create global package file list and use throughout PACKAGEFUNCSRichard Purdie
Currently we do a signficant amount of tree traversal in many different places which in inefficient. We can assume that the files don't change and cache the file list which gives an efficiency improvement which this patch does using a global variable. (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907) 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-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-18debian.bbclass: invoke target objdumpJames Limbouris
Using the host objdump can lead to errors like: objdump: library.so.1.0.0: File format is ambiguous objdump: Matching formats: elf32-littlearm elf32-littlearm-symbian elf32-littlearm-vxworks with certain configurations of binutils. Signed-off-by: James Limbouris <james@digitalmatter.com.au> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie
This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed.
2012-05-30meta: replace os.popen with subprocess.PopenRobert Yang
Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There are both bb.process.run() and bb.process.Popen() which wraps the subprocess module, use it for simplifying the code. Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run() can handle it, it will raise exception when error occurs, we should handle the exception ourselves if we want to ignore the error. 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-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>
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-21debian.bbclass: Fix hardcoded "lib" referenceRichard Purdie
This patch removes a hardcoded "lib" reference from debian.bbclass allowing libdirs like "lib64" to be used. Whilst working on this area of code, a similar assumption about "bin" is removed and the regular expression compilation is moved to the parent function since it doesn't change and this will improve the speed of the code. 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-03-08debian.bbclass: call auto_libname in reverse sorted AUTO_LIBNAME_PKGSMartin Jansa
* see comment for reason why we need this * more info: http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-February/029877.html Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Acked-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-02-10debian.bbclass: Only set rdeptask for do_package if packaging is enabledRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2009-11-16debian/kernel/gconf/gtk-icon-cache: PKGDESK/PKG fixesRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2008-03-04debian.bbclass: merge DEBIANNAME support from OEMarcin Juszkiewicz
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3904 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-24package.bbclass: Remove PKGMAPS functionality and supersede with pkgdata. ↵Richard Purdie
Remove duplicate unneeded PACKAGES checks. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3225 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-01debian.bbclass: Remove stable BUILD_ALL_DEPS referenceRichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2631 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-23debian.bbclass: Fix dependenciesRichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2542 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-07-06debian.bbclass: fixed typoMarcin Juszkiewicz
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2127 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20classes: Sync with OE - mainly quoting fixes or other minor updatesRichard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-10-20package.bbclass: Split into two tasks, one which prepares the packages and ↵Richard Purdie
then package_write which actually generates the packages. The two stage approach allows us to avoid circular dependency issues from classes like debian.bbclass. As the data being emitted into pkgdata/ changed, you need to either wipe tmp or rerun the do_install/do_package tasks (wipe the do_xyz stamps from the stamps dir). Everything will repackage anyway due to the new task. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@807 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-08-14classes/base.bbclass:Richard Purdie
* Add stamps for do_fetch task * Remove empty NOTE messages * Add do_configure task dependecy for DEPENDS handling classes/debian.bbclass: * Add do_package task dependecy for RDEPENDS handling classes/image_ipk.bbclass: * Add do_package task dependecy for recursive RDEPENDS handling classes/package.bbclass: * Add do_package task dependecy for DEPENDS handling classes/rootfs_ipk.bbclass: * Derive image PR from DATE and TIME * Add stamps to do_rootfs task (PR changing will trigger rebuilds instead) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@605 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21Rename /openembedded/ -> /meta/Richard Purdie
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966