From: Richard Purdie Date: Thu, 21 Sep 2023 15:54:54 +0000 (+0100) Subject: oeqa/selftest: Fix broken symlink removal handling X-Git-Tag: yocto-5.2~5102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbdb6e73b0f52bc5f9429aca47802d51edbbc834;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest: Fix broken symlink removal handling The test above this removal correctly looks at symlinks however to remove a symlink we should call unlink(), not remove(). This avoids some build failures/tracebacks. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 7dab5614a92..16486e7eb99 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -437,7 +437,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): output_link = os.path.join(os.path.dirname(args.output_log), "%s-results.log" % self.name) if os.path.lexists(output_link): - os.remove(output_link) + os.unlink(output_link) os.symlink(args.output_log, output_link) return rc