summaryrefslogtreecommitdiffstats
path: root/meta/classes/relocatable.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie2012-03-051-4/+4
| | | | | | | | sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` 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-1/+1
| | | | | | | | | | | | | | | | | 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>
* relocatable.bbclass: Cover libexecdirRichard Purdie2010-08-121-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* relocatable.bbclass: reduce the amount of outputJoshua Lock2010-05-241-1/+1
| | | | | | | Disable the last bb.note call, it's a bit spurious. Only really useful for debug. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Normalise the generated pathJoshua Lock2010-04-271-0/+1
| | | | | | | | | | The generated path we create for the binaries RPATH can have a lot of directory separators in. Use os.path.normpath() to tidy it up and only include the required directory separators. This patch is purely to appease my personal sense of niceness... Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Actually skip symlinksJoshua Lock2010-04-121-4/+2
| | | | | | | The previous patch to do so was badly merged and didn't actually skip all symlinks, only ones which where not an absolute path... Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: ignore symlinksJoshua Lock2010-04-081-1/+2
| | | | | | | | If this links to a file created by the package install we already handle it when we process the sysroot. By ignoring symlinks here we don't cause a build to fail when the symlink is to somewhere in the host OS. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Handle files which don't have read/write permissionsJoshua Lock2010-04-081-2/+17
| | | | | | | | It's possible to have files in our sysroot which don't have the write (or in some cases even the read) bit set. Test for these and if they are not set temporarily set them so that we can chrpath the binaries. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable: Handle directories having subdirectories of binariesJoshua Lock2010-04-011-15/+24
| | | | | | | | | | | | Make the processing of directories less naive so that it can handle a directory with children that are directories. We now scan for and process binaries in all directories below the scanned paths rather than only the top-level directory. This patch moves the meat of the post-processing into a separate function which is fed paths, process_dir (). Then when the function finds a subdirectory of the passed path which is itself a directory it recursively calls itself. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: we need to process library files tooJoshua Lock2010-03-261-1/+1
| | | | | | | The .so files we ship also have a RPATH encoded so should be post-processed for a relocatable RPATH too. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Clean up indentationRichard Purdie2010-02-221-43/+46
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* relocatable.bbclass: Handle symlinks correctlyRichard Purdie2010-02-221-1/+6
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* relocatable.bbclass: Enhancements to rpath replacement algorithmJoshua Lock2010-02-181-15/+38
| | | | | | | | | | | | | | This patch removes the hard coded number of parent directory operators ( /..) placed into the rpath and instead fully dynamically generates the rpath entries based on the current rpath. Theoretically this patch means we can now make cross packages relocatable but this is *not* enabled as chrpath can only set a new rpath of the same length or shorter than the existing rpath. Due to the amount of parent directory jumps we need to encode in the rpath this can easily fail when TMPDIR is in a short namespace (e.g. /usr/poky). Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Tidy up classJoshua Lock2010-02-121-4/+3
| | | | | | | There was a hard coded path and a spurious variable left in before the last commit. Whoops ... Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: Improve logic and styleJoshua Lock2010-02-121-15/+31
| | | | | | | | | | | | The initial pass at this class was pretty lame and broke on a lot of native packages. This rewrite makes the code a lot more dynamic, removing use of hard coded paths and improving the logic. The class now runs a chrpath -l over the binary to determine what rpaths are currently set. It then munges the output and determines relative versions of each component of the rpath and uses chrpath -r to set them. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* relocatable.bbclass: remove hard-coded rpaths from native binariesJoshua Lock2010-02-111-0/+24
The relocatable path will pre-process built binaries in SYSROOT_DESTDIR and replace any harcoded dynamic link rpaths with relative paths. Add an inherit of class in native.bbclass to make our native packages relocatable and tweak the chrpath recipe so that the native package can make itself relocatable with the just built chrpath binary. Signed-off-by: Joshua Lock <josh@linux.intel.com>