summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2016-11-28 12:37:35 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:52:25 +0100
commitde1b5983c7f36771a0a6bcde8eb1228f3cd6942d (patch)
tree65e3b5a5c7fc12c1ae8dc8ef14ace5c7927504ba /meta/classes
parent069b12591439b16e7b11394157d0686cf423f898 (diff)
downloadpoky-de1b5983c7f36771a0a6bcde8eb1228f3cd6942d.tar.gz
archiver.bbclass: fix do_ar_original error for matchbox-desktop
Error: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR: matchbox-desktop-2.1-r0 do_ar_original: Can not determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: git://git.yoctoproject.org/matchbox-desktop-2 file://vfolders/%2A ERROR: matchbox-desktop-2.1-r0 do_ar_original: Function failed: do_ar_original ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function do_ar_original, when recipes have more than one source, it added the "name" URL parameter as suffix to identify the created tarball. But the URL type "file://" that we always used to represent a series of patches, it didn't have "name" parameter, so it failed. So set "name" to the folder name to identify the created tarball, for example: In matchbox-desktop bb file, the SRC_URI contains: file://vfloders/* We set "name" to "vfolders" to identify the created tarball. In connman-gnome bb file, the SRC_URI contains: file://images/* We set "name" to "images" to identify the created tarball. (From OE-Core rev: 0af636c635391b30c987dedeffe597ef4f8a1ed8) Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/archiver.bbclass16
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 1319f4df08..82f0b16138 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -177,12 +177,18 @@ python do_ar_original() {
177 # to be set when using the git fetcher, otherwise SRCREV cannot 177 # to be set when using the git fetcher, otherwise SRCREV cannot
178 # be set separately for each URL. 178 # be set separately for each URL.
179 params = bb.fetch2.decodeurl(url)[5] 179 params = bb.fetch2.decodeurl(url)[5]
180 type = bb.fetch2.decodeurl(url)[0]
181 location = bb.fetch2.decodeurl(url)[2]
180 name = params.get('name', '') 182 name = params.get('name', '')
181 if name in tarball_suffix: 183 if type.lower() == 'file':
182 if not name: 184 name_tmp = location.rstrip("*").rstrip("/")
183 bb.fatal("Cannot determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: %s %s" % (tarball_suffix[name], url)) 185 name = os.path.basename(name_tmp)
184 else: 186 else:
185 bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url)) 187 if name in tarball_suffix:
188 if not name:
189 bb.fatal("Cannot determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: %s %s" % (tarball_suffix[name], url))
190 else:
191 bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
186 tarball_suffix[name] = url 192 tarball_suffix[name] = url
187 create_tarball(d, tmpdir + '/.', name, ar_outdir) 193 create_tarball(d, tmpdir + '/.', name, ar_outdir)
188 194