[oe-commits] Richard Purdie : oeqa/recipetool: Fix symlink resolution

git at git.openembedded.org git at git.openembedded.org
Sat Jun 27 21:45:53 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 878764ab7252f9b5b67b697dcd51b961b673fda0
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=878764ab7252f9b5b67b697dcd51b961b673fda0

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Sat Jun 27 08:10:29 2015 +0100

oeqa/recipetool: Fix symlink resolution

Instead of readlink we need to use realpath to resolve any possible
symlink in the file name. I'd got the two confused in the previous
patch. This should really fix selftest failures on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/selftest/recipetool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index c08b2e4..b3ca171 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -112,7 +112,7 @@ class RecipetoolTests(DevtoolBase):
     def test_recipetool_appendfile_binary(self):
         # Try appending a binary file
         # /bin/ls can be a symlink to /usr/bin/ls
-        ls = os.readlink("/bin/ls")
+        ls = os.path.realpath("/bin/ls")
         result = runCmd('recipetool appendfile %s /bin/ls %s -r coreutils' % (templayerdir, ls))
         self.assertIn('WARNING: ', result.output)
         self.assertIn('is a binary', result.output)



More information about the Openembedded-commits mailing list