Patchwork delete the tail slash in directory name

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Aug. 20, 2014, 8:15 a.m.
Message ID <1408522500-11699-1-git-send-email-rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/78663/
State Accepted
Commit 181bcbe2c74abb220c08888ba5a8d3dbd6fbe155
Headers show

Comments

rongqing.li@windriver.com - Aug. 20, 2014, 8:15 a.m.
From: Jian Liu <jian.liu@windriver.com>

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>
---
 meta/classes/archiver.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index efd413b..35e5411 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -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):