summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2009-03-25 18:29:54 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2009-03-25 18:29:54 +0100
commit95e0882e2dfabe457550a885e0eb24893df31742 (patch)
treea34220ed25168022c53d9cb5697f3666a427b30c /classes/base.bbclass
parent451b1c687105655a4f2c9c477b05535041e25060 (diff)
parentac41ae95b1dbe54c05adf494c0fa44b3abbfeca3 (diff)
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index f39059ecc0..9ec705bc1e 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -794,7 +794,9 @@ python base_do_unpack() {
try:
local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
except bb.MalformedUrl, e:
- raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
+ raise bb.build.FuncFailed('Unable to generate local path for malformed uri: %s' % e)
+ if not local:
+ raise bb.build.FuncFailed('Unable to locate local file for %s' % url)
local = os.path.realpath(local)
ret = oe_unpack_file(local, localdata, url)
if not ret:
@@ -868,7 +870,7 @@ def base_get_metadata_svn_revision(path, d):
def base_get_metadata_git_branch(path, d):
import os
- branch = os.popen('cd %s; git symbolic-ref HEAD' % path).read()
+ branch = os.popen('cd %s; git symbolic-ref HEAD' % path).read().rstrip()
if len(branch) != 0:
return branch.replace("refs/heads/", "")
@@ -876,7 +878,7 @@ def base_get_metadata_git_branch(path, d):
def base_get_metadata_git_revision(path, d):
import os
- rev = os.popen("cd %s; git show-ref HEAD" % path).read().split(" ")[0]
+ rev = os.popen("cd %s; git show-ref HEAD" % path).read().split(" ")[0].rstrip()
if len(rev) != 0:
return rev
return "<unknown>"