Re: [OE-core] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-08-24 Thread Sean Nyekjaer
On Tue, Aug 24, 2021 at 08:14:58AM +, Mittal, Anuj wrote:
> Hello,
> 
> On Mon, 2021-08-23 at 14:31 +0200, Sean Nyekjaer wrote:
> > On Thu, May 06, 2021 at 08:51:00AM +0100, Richard Purdie wrote:
> > > 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 
> > 
> > Anuj will you backport this to gatesgarth?
> 
> gatesgarth isn't being maintained any more.
> 
> https://wiki.yoctoproject.org/wiki/Releases
> 

Hi Anuj,

I know, but gatesgarth is left in a broken state because of
edc8051bc0 image: Add directories to PSEUDO_IGNORE_PATHS
was merged ;)

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155213): 
https://lists.openembedded.org/g/openembedded-core/message/155213
Mute This Topic: https://lists.openembedded.org/mt/82625316/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-08-24 Thread Anuj Mittal
Hello,

On Mon, 2021-08-23 at 14:31 +0200, Sean Nyekjaer wrote:
> On Thu, May 06, 2021 at 08:51:00AM +0100, Richard Purdie wrote:
> > 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 
> 
> Anuj will you backport this to gatesgarth?

gatesgarth isn't being maintained any more.

https://wiki.yoctoproject.org/wiki/Releases

Thanks,

Anuj

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155211): 
https://lists.openembedded.org/g/openembedded-core/message/155211
Mute This Topic: https://lists.openembedded.org/mt/82625316/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-08-23 Thread Sean Nyekjaer
On Thu, May 06, 2021 at 08:51:00AM +0100, Richard Purdie wrote:
> 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 

Anuj will you backport this to gatesgarth?

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155150): 
https://lists.openembedded.org/g/openembedded-core/message/155150
Mute This Topic: https://lists.openembedded.org/mt/82625316/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-05-06 Thread Richard Purdie
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 
---
 meta/lib/oe/package_manager/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager/__init__.py 
b/meta/lib/oe/package_manager/__init__.py
index 8e7128b1958..4d22bc0296c 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):
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151381): 
https://lists.openembedded.org/g/openembedded-core/message/151381
Mute This Topic: https://lists.openembedded.org/mt/82625316/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-