summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-04 01:01:44 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-14 17:17:23 +0000
commit37a0e4ddff58c0120cc5cfef104b60d0e180638c (patch)
tree1628857a2eb33ab517ba93d6a3ca25e55bd3e628 /import-layers/yocto-poky/meta/classes/archiver.bbclass
parent3c4c45d1e9a2324191a8640b22df1b71f15f3037 (diff)
downloadtalos-openbmc-37a0e4ddff58c0120cc5cfef104b60d0e180638c.tar.gz
talos-openbmc-37a0e4ddff58c0120cc5cfef104b60d0e180638c.zip
Squashed 'import-layers/yocto-poky/' changes from dc8508f6099..67491b0c104
Yocto 2.2.2 (Morty) Change-Id: Id9a452e28940d9f166957de243d9cb1d8818704e git-subtree-dir: import-layers/yocto-poky git-subtree-split: 67491b0c104101bb9f366d697edd23c895be4302 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/archiver.bbclass')
-rw-r--r--import-layers/yocto-poky/meta/classes/archiver.bbclass12
1 files changed, 4 insertions, 8 deletions
diff --git a/import-layers/yocto-poky/meta/classes/archiver.bbclass b/import-layers/yocto-poky/meta/classes/archiver.bbclass
index 9239983e8..188f8c042 100644
--- a/import-layers/yocto-poky/meta/classes/archiver.bbclass
+++ b/import-layers/yocto-poky/meta/classes/archiver.bbclass
@@ -125,7 +125,7 @@ python () {
# (e.g. git repositories) is "unpacked" and then put into a tarball.
python do_ar_original() {
- import shutil, tarfile, tempfile
+ import shutil, tempfile
if d.getVarFlag('ARCHIVER_MODE', 'src', True) != "original":
return
@@ -261,13 +261,9 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
filename = '%s.tar.gz' % d.getVar('PF', True)
tarname = os.path.join(ar_outdir, filename)
- srcdir = srcdir.rstrip('/')
- dirname = os.path.dirname(srcdir)
- basename = os.path.basename(srcdir)
- os.chdir(dirname)
bb.note('Creating %s' % tarname)
tar = tarfile.open(tarname, 'w:gz')
- tar.add(basename)
+ tar.add(srcdir, arcname=os.path.basename(srcdir))
tar.close()
# creating .diff.gz between source.orig and source
@@ -353,8 +349,8 @@ python do_ar_recipe () {
bbappend_files = d.getVar('BBINCLUDED', True).split()
# If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
# Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
- bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
- bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
+ bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
+ bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
for file in bbappend_files:
if bbappend_re.match(file) or bbappend_re1.match(file):
shutil.copy(file, outdir)
OpenPOWER on IntegriCloud