diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/archiver.bbclass | 16 |
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 | ||