mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
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: c22f64d16b0801a3bcebda81a6fedcad8fe02ab3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1a03c70c282b3445b93a4c70ea6d40a1778750c5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9c1e94752e
commit
cec9cfb059
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user