summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/archiver.bbclass20
1 files changed, 15 insertions, 5 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index fb0c77d954..0938c992de 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -79,6 +79,11 @@ python () {
79 79
80 if ar_src == "original": 80 if ar_src == "original":
81 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn) 81 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_original' % pn)
82 # 'patched' and 'configured' invoke do_unpack_and_patch because
83 # do_ar_patched resp. do_ar_configured depend on it, but for 'original'
84 # we have to add it explicitly.
85 if d.getVarFlag('ARCHIVER_MODE', 'diff') == '1':
86 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_unpack_and_patch' % pn)
82 elif ar_src == "patched": 87 elif ar_src == "patched":
83 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' % pn) 88 d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_patched' % pn)
84 elif ar_src == "configured": 89 elif ar_src == "configured":
@@ -285,11 +290,16 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
285 290
286 dirname = os.path.dirname(src) 291 dirname = os.path.dirname(src)
287 basename = os.path.basename(src) 292 basename = os.path.basename(src)
288 os.chdir(dirname) 293 bb.utils.mkdirhier(ar_outdir)
289 out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF')) 294 cwd = os.getcwd()
290 diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, basename, out_file) 295 try:
291 subprocess.call(diff_cmd, shell=True) 296 os.chdir(dirname)
292 bb.utils.remove(src_patched, recurse=True) 297 out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF'))
298 diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, basename, out_file)
299 subprocess.check_call(diff_cmd, shell=True)
300 bb.utils.remove(src_patched, recurse=True)
301 finally:
302 os.chdir(cwd)
293 303
294# Run do_unpack and do_patch 304# Run do_unpack and do_patch
295python do_unpack_and_patch() { 305python do_unpack_and_patch() {