aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/path.py
AgeCommit message (Collapse)Author
2013-02-11lib/oe/path.py: support missing directory components in realpath()Enrico Scholz
Some use cases in OE operate on symlinks which dangling path components. Assume that these are directories instead of raising ENOENT. (From OE-Core rev: a96e2c84f24c15b77ee1fbc1f998b8b4796b8664) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11lib: implemented oe.path.realpath()Enrico Scholz
Various parts of the buildsystem have to work with symlinks. Resolving them is not trivial because they are always relative to a sysroot directory. Patch adds a function which returns the destination of a symlink by assuming a given path as the / toplevel directory. A testsuite was added too. (From OE-Core rev: 76e0bd7f8e3a3bd052a6e329f88e2d8099e899c4) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06sstate/path.py: Add copyhardlinktree() function and use for performance ↵Richard Purdie
optimisation Add a function which copys a tree as a set of hardlinks to the original files, then use this in sstate to reduce some of the overhead of sstate package creation since the file isn't actually copied. (From OE-Core rev: 8e373e69acac853213a62afb8bbdf0adc0c5045a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. (From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13path.py: add make_relative_symlink methodScott Garman
This method allows you to convert an absolute symlink into a relative one. (From OE-Core rev: 71062c1e0fb45a4b4e58ea5d217706aa2b402d88) Signed-off-by: Scott Garman <scott.a.garman@intel.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-03-23oe.path: sync up with current OEChris Larson
(From OE-Core rev: 1958b303f98b8db5bab00344823bbb8e086b8dba) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-02lib/oe/path.py: Use bb.utils.mkdirhier instead of bb.mkdirhierKhem Raj
(From OE-Core rev: 5a22a8c06743b0a8a3d949288b99d53bd4b7ceb3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21lib/oe/path.py: Add expection class to handle the output argumentRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-18meta/lib/oe/path: Use check_output for subprocess so we can see error info. ↵Richard Purdie
Import code to be python 2.6 compatible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-09lib.oe.path: Update copytree function to call shell commands since its twice ↵Richard Purdie
as fast As an added bonus, hardlinks between files in the tree will be preserved too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2010-08-22lib/oe/path: Use bb.utils.copyfile as shutils can't cope with copying ↵Richard Purdie
unreadable files Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe/path.py: Add copytree function that worksRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-12lib/oe: support wildcards in path.removeJoshua Lock
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-04lib/oe: sync with OE.devJoshua Lock
Most notable change is the move to creating symlinks to patches in the metadata tree rather than copying them. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-05-06lib/oe: Import oe lib from OE.devJoshua Lock
This library moves the common Python methods into modules of an 'oe' Python package. Signed-off-by: Joshua Lock <josh@linux.intel.com>