Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] archiver.bbclass: fix can't create diff tarball
@ 2016-11-24  2:40 Dengke Du
  2016-11-24  2:40 ` [PATCH 1/1] " Dengke Du
  0 siblings, 1 reply; 2+ messages in thread
From: Dengke Du @ 2016-11-24  2:40 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 12a0ee049e453b6d0d2ce2f3fa981d1b6e02bd78:

  dev-manual: Added note about RPM not dealing with post-install (2016-11-23 11:10:35 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib dengke/fix-can-not-create-diff-tarball
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=dengke/fix-can-not-create-diff-tarball

Dengke Du (1):
  archiver.bbclass: fix can't create diff tarball

 meta/classes/archiver.bbclass | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4



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

* [PATCH 1/1] archiver.bbclass: fix can't create diff tarball
  2016-11-24  2:40 [PATCH 0/1] archiver.bbclass: fix can't create diff tarball Dengke Du
@ 2016-11-24  2:40 ` Dengke Du
  0 siblings, 0 replies; 2+ messages in thread
From: Dengke Du @ 2016-11-24  2:40 UTC (permalink / raw)
  To: openembedded-core

When enable:
	ARCHIVER_MODE[src] = "configured"
	ARCHIVER_MODE[diff] = "1"

There is no "diff" tarball created, just "configured" tarball created, in log
file: log.do_unpack_and_patch, it said that directory doesn't exist.

This is because when enable "diff" and "configured", system use create_diff_gz and
do_ar_configured function respectively.

In do_ar_configured function, it use create_tarball function, and the create_tarball
use the function:

	bb.utils.mkdirhier(ar_outdir)

So when creating "configured" tarball, there was no "directory doesn't exist" problem
and it was created successfully.

In create_diff_gz function, it didn't create the directory "ar_outdir", so it can't create
"diff" tarball, and throw the problem that directory doesn't exit.

So we should add the

	bb.utils.mkdirhier(ar_outdir)

to function create_diff_gz in archiver.bbclass.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta/classes/archiver.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 9239983..abe6f2b 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -290,6 +290,7 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
     dirname = os.path.dirname(src)
     basename = os.path.basename(src)
     os.chdir(dirname)
+    bb.utils.mkdirhier(ar_outdir)
     out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF', True))
     diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, basename, out_file)
     subprocess.call(diff_cmd, shell=True)
-- 
2.7.4



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

end of thread, other threads:[~2016-11-24  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-24  2:40 [PATCH 0/1] archiver.bbclass: fix can't create diff tarball Dengke Du
2016-11-24  2:40 ` [PATCH 1/1] " Dengke Du

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