]> code.ossystems Code Review - openembedded-core.git/commitdiff
archiver: delete the tail slash in directory name
authorJian Liu <jian.liu@windriver.com>
Wed, 20 Aug 2014 08:15:00 +0000 (16:15 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Aug 2014 08:29:49 +0000 (09:29 +0100)
If directory names in SRC_URI ended with "/", function
do_ar_original() in layers/oe-core/meta/classes/archiver.bbclass
will generate a tar file whose name is ".tar.gz".
So delete the "/" at the tail of the directory names before use the names.

Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archiver.bbclass

index efd413bdc40c64ae4a3800fe605fd078db91c612..35e541194c1d5fbe3bbeb709d08eed32a014defb 100644 (file)
@@ -136,7 +136,7 @@ python do_ar_original() {
     bb.note('Archiving the original source...')
     fetch = bb.fetch2.Fetch([], d)
     for url in fetch.urls:
-        local = fetch.localpath(url)
+        local = fetch.localpath(url).rstrip("/");
         if os.path.isfile(local):
             shutil.copy(local, ar_outdir)
         elif os.path.isdir(local):