From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH][v2] base.bbclass: re-add backward compatibility with bitbake w.r.t decodeurl fix in bitbake
Date: Tue, 6 Jul 2010 16:29:42 -0700 [thread overview]
Message-ID: <1278458982-3362-1-git-send-email-raj.khem@gmail.com> (raw)
This patch seems to work with both bitbakes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
classes/base.bbclass | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 2da0b7a..b30310d 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -219,14 +219,25 @@ def oe_unpack_file(file, data, url = None):
# The "destdir" handling was specifically done for FILESPATH
# items. So, only do so for file:// entries.
if type == "file":
- dest = os.path.dirname(path) or "."
+ if not host:
+ dest = os.path.dirname(path) or "."
+ else:
+ # this case is for backward compatiblity with older version
+ # of bitbake which do not have the fix
+ # http://cgit.openembedded.org/cgit.cgi/bitbake/commit/?id=ca257adc587bb0937ea76d8b32b654fdbf4192b8
+ # this should not be needed once all releases of bitbake has this fix
+ # applied/backported
+ dest = host + os.path.dirname(path) or "."
else:
dest = "."
bb.mkdirhier("%s" % os.path.join(os.getcwd(),dest))
cmd = 'cp %s %s' % (file, os.path.join(os.getcwd(), dest))
if not cmd:
return True
- dest = os.path.join(os.getcwd(), path)
+ if not host:
+ dest = os.path.join(os.getcwd(), path)
+ else:
+ dest = os.path.join(os.getcwd(), os.path.join(host, path))
if os.path.exists(dest):
if os.path.samefile(file, dest):
return True
--
1.7.1
next reply other threads:[~2010-07-06 23:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 23:29 Khem Raj [this message]
2010-07-06 23:48 ` [PATCH][v2] base.bbclass: re-add backward compatibility with bitbake w.r.t decodeurl fix in bitbake Samuel Sieb
2010-07-07 8:35 ` Jan Paesmans
2010-07-07 9:38 ` Frans Meulenbroeks
2010-07-15 7:21 ` Graham Gower
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=1278458982-3362-1-git-send-email-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-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