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:00 +0100 |
commit | e9c8f43296552b43376d87fb291458731fb7f718 (patch) | |
tree | c33c12be9f115e39d09c195aedde53c702c54e72 | |
parent | 3c59989b7a09f412704f90480c3726a0cb7df746 (diff) | |
download | openembedded-core-e9c8f43296552b43376d87fb291458731fb7f718.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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): 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): |