package.bbclass: use oe.path.realpath()
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Sun, 10 Feb 2013 12:41:47 +0000 (13:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Feb 2013 14:46:11 +0000 (14:46 +0000)
commit132baeeea1d2175849e4206db3c5aae250e10ca7
treeb4da95bb9649b22f7cfd116756080d2f2cb1caef
parentd69746b6cd187b73086fb3ce37f636770f700467
package.bbclass: use oe.path.realpath()

oe.path.realpath() provides are common and more correct implementation
for resolving symlinks within sysroot. Use it.

Old implementation suffered from lot of problems; e.g.

* redundant code

* calls 'os.stat()' which references files on host; this can give wrong
  results about existing/non-existing and can cause EPERM (instead of
  the catched ENONENT) exceptions

* does not deal with special cases like '..' leaving the sysroot.

(From OE-Core rev: ec2aab09769f4b6817d74d2175afa2b7c7598750)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass