[oe-commits] Mark Hatle : package_ipk.bbclass: Fix SRC_URI whitespace handling
git at git.openembedded.org
git at git.openembedded.org
Mon Oct 6 15:03:29 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 16cedc3bce6fc37543e9ef053cd7c589e523ca1c
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=16cedc3bce6fc37543e9ef053cd7c589e523ca1c
Author: Mark Hatle <mark.hatle at windriver.com>
Date: Mon Oct 6 09:05:08 2014 -0500
package_ipk.bbclass: Fix SRC_URI whitespace handling
The SRC_URI may contain whitespace, but be otherwise empty. This can happen
in the case:
MYSRC = ""
MYSRC_arm = "file://myarm.patch"
SRC_URI += "${MYSRC}"
Unless we strip blank spaces, to determine if it is empty, we can end up
generating a "Source: " line which in invalid. This leads to the error:
invalid Source: field is speified in the generated CONTROL file
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/package_ipk.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 9586e06..44fd3eb 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -207,7 +207,7 @@ python do_package_ipk () {
ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
- src_uri = localdata.getVar("SRC_URI", True) or "None"
+ src_uri = localdata.getVar("SRC_URI", True).strip() or "None"
if src_uri:
src_uri = re.sub("\s+", " ", src_uri)
ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
More information about the Openembedded-commits
mailing list