diff options
author | Steve Sakoman <steve@sakoman.com> | 2021-05-06 06:10:56 -1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-13 22:10:06 +0100 |
commit | 1c0af37378b040fbc1fc6a841299c7a19d75cd56 (patch) | |
tree | 8036256b8d6c46ff718c55c7aed0a2987cc8164c | |
parent | 85866a453c7290624f34bf5bf55423686f575566 (diff) | |
download | poky-1c0af37378b040fbc1fc6a841299c7a19d75cd56.tar.gz |
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: e9c8f43296552b43376d87fb291458731fb7f718)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oe/package_manager.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index b0660411ea..db988d9247 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -403,7 +403,7 @@ class PackageManager(object, metaclass=ABCMeta): | |||
403 | bb.utils.remove(self.intercepts_dir, True) | 403 | bb.utils.remove(self.intercepts_dir, True) |
404 | bb.utils.mkdirhier(self.intercepts_dir) | 404 | bb.utils.mkdirhier(self.intercepts_dir) |
405 | for intercept in postinst_intercepts: | 405 | for intercept in postinst_intercepts: |
406 | bb.utils.copyfile(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept))) | 406 | shutil.copy(intercept, os.path.join(self.intercepts_dir, os.path.basename(intercept))) |
407 | 407 | ||
408 | @abstractmethod | 408 | @abstractmethod |
409 | def _handle_intercept_failure(self, failed_script): | 409 | def _handle_intercept_failure(self, failed_script): |