From: <mingli.yu@windriver.com>
To: <richard.purdie@linuxfoundation.org>,
<openembedded-core@lists.openembedded.org>
Subject: [PATCH] package_manager.py: check the dest before create hard link
Date: Wed, 24 Oct 2018 15:18:13 +0800 [thread overview]
Message-ID: <20181024071813.110075-1-mingli.yu@windriver.com> (raw)
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
next reply other threads:[~2018-10-24 7:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 7:18 mingli.yu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181024071813.110075-1-mingli.yu@windriver.com \
--to=mingli.yu@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox