ARCHIVER: use variable for compression choice

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Change-Id: I62783c37448b5b53957354ed43e906d30ccf2f85
This commit is contained in:
Christophe Priouzeau 2022-06-06 15:33:31 +02:00 committed by bernard PUEL
parent cbf5c7d122
commit 68fa5e71a9
1 changed files with 3 additions and 2 deletions

View File

@ -5,8 +5,9 @@ python archiver_clean_tarball() {
import os
ar_outdir = d.getVar('ARCHIVER_OUTDIR')
compression_method = d.getVarFlag('ARCHIVER_MODE', 'compression')
#get tarball name
tarball_name = [f for f in listdir(ar_outdir) if f.endswith("tar.gz")]
tarball_name = [f for f in listdir(ar_outdir) if f.endswith("tar.%s" % compression_method)]
tmpdir = tempfile.mkdtemp(dir=d.getVar('ARCHIVER_WORKDIR'))
if tarball_name and tarball_name[0] and len(tarball_name[0]) > 0:
tar = tarfile.open(os.path.join(ar_outdir,tarball_name[0]))
@ -29,7 +30,7 @@ do_ar_original[postfuncs] =+ "archiver_clean_tarball"
ARCHIVER_README = "README.HOW_TO.txt"
archiver_git_uri() {
ret=`echo "${SRC_URI}" | grep branch | wc -l`
ret=$(echo "${SRC_URI}" | grep branch | wc -l)
if [ $ret -gt 0 ]; then
BRANCH=`echo "${SRC_URI}" | sed "s|.*branch=\([^ ;]*\).*|\1|" `
else