Commit Graph

29 Commits

Author SHA1 Message Date
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
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\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Richard Purdie 7c3d4c033e debian: Fix superfluous setting for RPROVIDES
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.

(From OE-Core rev: 056339c32a9ff0735d39cae216663147cdbb275c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-14 11:42:19 +00:00
Richard Purdie 771126cc4d debian: Add versions to RPROVIDES
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).

(From OE-Core rev: 8b9df5112443c1b712cb5c63128bebbbd38cd7fc)

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>
2015-07-20 10:40:40 +01:00
Richard Purdie 86d30d756a meta: Add explict getVar param for (non) expansion
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>
2015-06-23 11:57:25 +01:00
Richard Purdie 3694f05ef0 debian: Set RPROVIDES to include the original packagename when renaming
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.

(From OE-Core rev: 3409c4379559afbb1d1d29045582995147a33bbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:44 +01:00
Richard Purdie b4ad9de91e bitbake.conf/debian.bbclass: Move AUTO_LIBNAME_PKGS definition to class file
Might as well move this default to the class which uses it allowing
for easier reading/understanding of the class.

(From OE-Core rev: 177aec177306e68bcd822dee6b29a7efbd558a91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Ross Burton e9008b01af debian.bbclass: inherit package
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.

(From OE-Core rev: 3aa52f85e774bf82e8470a8fd849bd6953930720)

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>
2014-07-25 15:33:59 +01:00
Richard Purdie 244f107c1f package: Create global package file list and use throughout PACKAGEFUNCS
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)

(From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01 15:54:02 +00:00
Richard Purdie 3247292683 Split do_packagedata task from do_package
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>
2013-01-25 12:42:47 +00:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
James Limbouris 66517610c5 debian.bbclass: invoke target objdump
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.

(From OE-Core rev: 6d761ae17ddbd3d936e7fe985b40825ad62b2418)

Signed-off-by: James Limbouris <james@digitalmatter.com.au>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-18 13:24:59 +01:00
Richard Purdie 0d9e893711 Revert "meta: replace os.popen with subprocess.Popen"
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 14:21:29 +01:00
Robert Yang 5996b2b58e meta: replace os.popen with subprocess.Popen
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]

(From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Richard Purdie 06f2f8ce0a meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:

sed \
 -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
 -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
 -i `grep -ril getVar *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:56 -08:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
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>
2011-11-10 11:51:19 +00:00
Richard Purdie d887bac4a2 debian.bbclass: Fix hardcoded "lib" reference
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.

(From OE-Core rev: 6b2e41023941f15d0f9211ef17339ba1fca9a3b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-21 13:42:53 +01:00
Lianhao Lu 27f8868509 debian/_ipk.bbclass: Added multilib support for package_name_hook()
[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.

(From OE-Core rev: e59c4e34daa688c033dd4ac07a69099610ac5705)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16 18:07:25 +01:00
Martin Jansa 1697ae6ee2 debian.bbclass: call auto_libname in reverse sorted AUTO_LIBNAME_PKGS
* see comment for reason why we need this
* more info:
  http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-February/029877.html

(From OE-Core rev: 6f0bbe463204d377f92140b6540d9d518d5c6d6b)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-10 18:14:20 -08:00
Richard Purdie 388a92bb7c debian.bbclass: Only set rdeptask for do_package if packaging is enabled
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-02-10 12:01:04 +00:00
Richard Purdie 5f22458409 debian/kernel/gconf/gtk-icon-cache: PKGDESK/PKG fixes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16 10:52:35 +00:00
Marcin Juszkiewicz dfb52cedd0 debian.bbclass: merge DEBIANNAME support from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3904 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-04 16:45:02 +00:00
Richard Purdie 48c7f7fc85 package.bbclass: Remove PKGMAPS functionality and supersede with pkgdata. Remove duplicate unneeded PACKAGES checks.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3225 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-24 23:06:56 +00:00
Richard Purdie 62eb35c1c4 debian.bbclass: Remove stable BUILD_ALL_DEPS reference
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2631 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-01 16:34:32 +00:00
Richard Purdie ff90ae3d0f debian.bbclass: Fix dependencies
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2542 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-23 08:12:18 +00:00
Marcin Juszkiewicz 794a923a80 debian.bbclass: fixed typo
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2127 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-07-06 13:04:11 +00:00
Richard Purdie e09dab0614 classes: Sync with OE - mainly quoting fixes or other minor updates
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-11-20 15:19:39 +00:00
Richard Purdie e2b821a834 package.bbclass: Split into two tasks, one which prepares the packages and 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-10-20 16:09:05 +00:00
Richard Purdie 283e9868e7 classes/base.bbclass:
* 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-08-14 00:38:08 +00:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00