archiver: delete the tail slash in directory name
PATCH 1/1 archiver: delete the tail slash in directory name
From: Jian Liu <[email protected]>
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 <[email protected]>
Signed-off-by Robert Yang <[email protected]>
---
meta/classes/archiver.bbclass | 1 +
1 file changed, 1 insertion(+)
meta/classes/archiver.bbclass +0 -0
@@ -149,6 +149,7 @@ python do_ar_original() {
fetch = bb.fetch2.Fetch([], d)
for url in fetch.urls:
local = fetch.localpath(url)
+ local = local.rstrip("/")
if os.path.isfile(local):shutil.copy(local, ar_outdir)
elif os.path.isdir(local):
Signature · 6 lines
1.8.5.2.233.g932f7e4 -- Jian Liu Email: [email protected] Office Phone: 86-10-84778539
Quoted 2 lines · Liu Jian
local =
fetch.localpath(url)
+ local =local.rstrip("/")
may be you could just do local = fetch.localpath(url).rstrip("/") in the same line