From: "Esquivel, Benjamin" <benjamin.esquivel@intel.com>
To: "bitbake-devel@lists.openembedded.org"
<bitbake-devel@lists.openembedded.org>
Subject: [Fwd: [PATCH] utils.movefile: specify dest file name]
Date: Tue, 1 Sep 2015 17:25:15 +0000 [thread overview]
Message-ID: <1441128323.3828.8.camel@intel.com> (raw)
Sending this to the right list.
Benjamin
-------- Forwarded Message --------
From: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: paul.eggleton@linux.intel.com, Benjamin Esquivel <
benjamin.esquivel@linux.intel.com>
Subject: [PATCH] utils.movefile: specify dest file name
Date: Thu, 20 Aug 2015 13:59:58 +0000
> When moving a file via the os.rename function, it was missing the
> destination file name which caused an OSError
>
> [YOCTO#8180]
>
> Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
> ---
> bitbake/lib/bb/utils.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
> index 5b94432..5eec787 100644
> --- a/bitbake/lib/bb/utils.py
> +++ b/bitbake/lib/bb/utils.py
> @@ -741,7 +741,9 @@ def movefile(src, dest, newmtime = None, sstat =
> None):
> renamefailed = 1
> if sstat[stat.ST_DEV] == dstat[stat.ST_DEV]:
> try:
> - os.rename(src, dest)
> + # os.rename needs to know the destination path with file
> name
> + destfile = os.path.join(dest, os.path.basename(src))
> + os.rename(src, destfile)
> renamefailed = 0
> except Exception as e:
> if e[0] != errno.EXDEV:
> --
> 2.3.0
>
next reply other threads:[~2015-09-01 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 17:25 Esquivel, Benjamin [this message]
2015-09-03 7:10 ` [PATCH] bitbake: fixing a potential error in movefile Benjamin Esquivel
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=1441128323.3828.8.camel@intel.com \
--to=benjamin.esquivel@intel.com \
--cc=bitbake-devel@lists.openembedded.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