summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-05 22:13:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-06 11:16:24 +0100
commiteff192abe2ee43ebf981bafbb7fca8602ebdcf0c (patch)
treecbfaf15c6c75d036a7a24cc2998b2890d44ad195
parent1140cca023e58af5e20aed9432e4210afd67f0e1 (diff)
downloadpoky-eff192abe2ee43ebf981bafbb7fca8602ebdcf0c.tar.gz
poky-eff192abe2ee43ebf981bafbb7fca8602ebdcf0c.tar.bz2
poky-eff192abe2ee43ebf981bafbb7fca8602ebdcf0c.zip
lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts
If the scripts/postinst-intercepts is owned by root/root then the copyfile() calls will fail due to chown issues. We don't care about ownership of these files so use shutil.copy() instead which won't perform any chown. (From OE-Core rev: 1a03c70c282b3445b93a4c70ea6d40a1778750c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py
index 8e7128b195..4d22bc0296 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -189,7 +189,7 @@ class PackageManager(object, metaclass=ABCMeta):
bb.utils.remove(self.intercepts_dir, True)
bb.utils.mkdirhier(self.intercepts_dir)
for intercept in postinst_intercepts:
- bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
+ shutil.copy(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept)))
@abstractmethod
def _handle_intercept_failure(self, failed_script):