Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] package_manager.py: check the dest before create hard link
@ 2018-10-24  7:18 mingli.yu
  2018-10-24 10:35 ` [PATCH v2] package_manager.py: correct the deploydir when packagefeed-stability inherited mingli.yu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mingli.yu @ 2018-10-24  7:18 UTC (permalink / raw)
  To: richard.purdie, openembedded-core

From: Mingli Yu <Mingli.Yu@windriver.com>

After create_packages_dir added in below commit:
85e72e1 package_manager: Filter to only rpms we depend upon

When add below line into conf/local.conf
INHERIT += "packagefeed-stability"

There comes below error when do_rootfs
Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm'

Add the check before create hard link to
avoid the above error.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
 meta/lib/oe/package_manager.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 2cc1c752b3..5d4739d66d 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -703,7 +703,8 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie
                     bb.utils.mkdirhier(destdir)
                     seendirs.add(destdir)
                 try:
-                    os.link(l, dest)
+                    if not os.path.exists(dest):
+                        os.link(l, dest)
                 except OSError as err:
                     if err.errno == errno.EXDEV:
                         bb.utils.copyfile(l, dest)
-- 
2.18.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-25  6:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-24  7:18 [PATCH] package_manager.py: check the dest before create hard link mingli.yu
2018-10-24 10:35 ` [PATCH v2] package_manager.py: correct the deploydir when packagefeed-stability inherited mingli.yu
2018-10-24 10:38   ` Yu, Mingli
2018-10-24 10:38 ` [PATCH v3] " mingli.yu
2018-10-25  6:18 ` [PATCH v4] " mingli.yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox