[oe-commits] [openembedded-core] 07/11: archiver.bbclass: fix do_ar_original error for matchbox-desktop

git at git.openembedded.org git at git.openembedded.org
Thu Jan 4 17:04:49 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch pyro-next
in repository openembedded-core.

commit 9dd945d083ee742dcb75d24d4be40468121008a6
Author: Dengke Du <dengke.du at windriver.com>
AuthorDate: Mon Nov 28 12:37:35 2016 +0000

    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 at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/archiver.bbclass | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 05a7996..78c6245 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -171,12 +171,18 @@ python do_ar_original() {
             # to be set when using the git fetcher, otherwise SRCREV cannot
             # be set separately for each URL.
             params = bb.fetch2.decodeurl(url)[5]
+            type = bb.fetch2.decodeurl(url)[0]
+            location = bb.fetch2.decodeurl(url)[2]
             name = params.get('name', '')
-            if name in tarball_suffix:
-                if not name:
-                    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))
-                else:
-                    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))
+            if type.lower() == 'file':
+                name_tmp = location.rstrip("*").rstrip("/")
+                name = os.path.basename(name_tmp)
+            else:
+                if name in tarball_suffix:
+                    if not name:
+                        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))
+                    else:
+                        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))
             tarball_suffix[name] = url
             create_tarball(d, tmpdir + '/.', name, ar_outdir)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list