From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] fetch2: Improve invalid SRCREV error message
Date: Mon, 20 Jan 2014 15:20:47 +0000 [thread overview]
Message-ID: <1390231247.874.35.camel@ted> (raw)
The current message can be ambiguous, improve it (and also rename a
variable to clean up the rest of the function).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index b4717c4..7e13b2f 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -897,17 +897,12 @@ def srcrev_internal_helper(ud, d, name):
raise FetchError("Conflicting revisions (%s from SRCREV and %s from the url) found, please spcify one valid value" % (srcrev, parmrev))
return parmrev
- rev = srcrev
- if rev == "INVALID" or not rev:
- var = "SRCREV_pn-%s" % pn
- if name != '':
- var = "SRCREV_%s_pn-%s" % (name, pn)
- raise FetchError("Please set %s to a valid value" % var, ud.url)
- if rev == "AUTOINC":
- rev = ud.method.latest_revision(ud, d, name)
-
- return rev
+ if srcrev == "INVALID" or not srcrev:
+ raise FetchError("Please set a valid SRCREV for url %s (possible key names are %s, or use a ;rev=X URL parameter)" % (str(attempts), ud.url), ud.url)
+ if srcrev == "AUTOINC":
+ srcrev = ud.method.latest_revision(ud, d, name)
+ return srcrev
def get_checksum_file_list(d):
""" Get a list of files checksum in SRC_URI
reply other threads:[~2014-01-20 15:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1390231247.874.35.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--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