Skip to contentSkip to conversation

archiver: delete the tail slash in directory name

PATCH In review Liu Jian 2 participants 2 messages Jul 24, 2014

lore
Share & tools
lore

Liu Jian

author
#0 lore raw

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.

---
meta/classes/archiver.bbclass | 1 +

1 file changed, 1 insertion(+)
meta/classes/archiver.bbclass +0 -0
index 70ffda5..a95b516 100644
@@ -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
#1 lore raw
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