Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] archiver - Drop unwanted directories
@ 2018-10-29 11:02 Fabien Lahoudere
  2018-10-29 11:33 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Fabien Lahoudere @ 2018-10-29 11:02 UTC (permalink / raw)
  To: openembedded-core

In sources directory we can find patches/ and temp/.
The first one is filled with symbolic link unusable on another
machines.
The second contains yocto logs to create this archives and are
typically copied when 'S = "${WORKDIR}"'

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
---
 meta/classes/archiver.bbclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index abaef87..0a9fe4f 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -275,6 +275,14 @@ python do_ar_configured() {
         create_tarball(d, srcdir, 'configured', ar_outdir)
 }
 
+def exclude_useless_paths(tarinfo):
+    if tarinfo.isdir():
+        if tarinfo.name.endswith('/temp') or tarinfo.name.endswith('/patches') or tarinfo.name.endswith('/.pc'):
+            return None
+        elif tarinfo.name == 'temp' or tarinfo.name == 'patches' or tarinfo.name == '.pc':
+            return None
+    return tarinfo
+
 def create_tarball(d, srcdir, suffix, ar_outdir):
     """
     create the tarball from srcdir
@@ -299,7 +307,7 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
 
     bb.note('Creating %s' % tarname)
     tar = tarfile.open(tarname, 'w:gz')
-    tar.add(srcdir, arcname=os.path.basename(srcdir))
+    tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
     tar.close()
 
 # creating .diff.gz between source.orig and source
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for archiver - Drop unwanted directories
  2018-10-29 11:02 [PATCH 1/1] archiver - Drop unwanted directories Fabien Lahoudere
@ 2018-10-29 11:33 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-10-29 11:33 UTC (permalink / raw)
  To: Fabien Lahoudere; +Cc: openembedded-core

== Series Details ==

Series: archiver - Drop unwanted directories
Revision: 1
URL   : https://patchwork.openembedded.org/series/14702/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [1/1] archiver - Drop unwanted directories
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-29 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 11:02 [PATCH 1/1] archiver - Drop unwanted directories Fabien Lahoudere
2018-10-29 11:33 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox