From: Henning Schild <henning.schild@siemens.com>
To: vijai kumar <vijaikumar.kanagarajan@gmail.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2] meta/classes: Make sure the files exists before copying
Date: Thu, 5 Dec 2019 10:36:53 +0100 [thread overview]
Message-ID: <20191205103653.0d845df5@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <2f0e4ece-4ab7-4d5e-8db8-65d2fdb0ddc4@googlegroups.com>
i would say so
Henning
On Mon, 2 Dec 2019 21:33:11 -0800
vijai kumar <vijaikumar.kanagarajan@gmail.com> wrote:
> Can this be merged to next??
>
> Thanks,
> Vijai Kumar K
>
> On Friday, November 8, 2019 at 11:17:45 PM UTC+5:30, vijai kumar
> wrote:
> >
> > From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> >
> > By default realpath doesnot check if the file exists and hence
> > might return an invalid path.
> >
> > Check if file exists before copying.
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> > Changes in v2:
> > - Use -f in if condition instead of realpath -e to make code
> > more readable.
> >
> > meta/classes/image.bbclass | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/classes/image.bbclass
> > b/meta/classes/image.bbclass index 8384b71..c845eab 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -129,12 +129,12 @@ EOF
> > do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
> > do_copy_boot_files() {
> > kernel="$(realpath -q '${IMAGE_ROOTFS}/${KERNEL_FILE}')"
> > - if [ -n "$kernel" ]; then
> > + if [ -f "$kernel" ]; then
> > cp -f "$kernel" '${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}'
> > fi
> >
> > initrd="$(realpath -q '${IMAGE_ROOTFS}/initrd.img')"
> > - if [ -n "$initrd" ]; then
> > + if [ -f "$initrd" ]; then
> > cp -f "$initrd" '${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}'
> > fi
> >
> > --
> > 2.17.1
> >
> >
>
next prev parent reply other threads:[~2019-12-05 9:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 11:41 [PATCH] " vijaikumar.kanagarajan
2019-11-08 17:10 ` Henning Schild
2019-11-08 17:41 ` Vijai Kumar K
2019-11-08 17:47 ` [PATCH v2] " vijaikumar.kanagarajan
2019-12-03 5:33 ` vijai kumar
2019-12-05 9:36 ` Henning Schild [this message]
2019-12-05 12:55 ` Baurzhan Ismagulov
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=20191205103653.0d845df5@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=vijaikumar.kanagarajan@gmail.com \
/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