summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-23 22:36:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-24 17:54:31 +0100
commit99fc78653a6933e24e57aed9df246b3fda529ca8 (patch)
tree448c23df74cb4e75ead4f4b90d6bbfa7daad7697 /meta/classes/archiver.bbclass
parentce7bc121c561eaab79440f02fe6ee4e9f0d02aad (diff)
downloadpoky-99fc78653a6933e24e57aed9df246b3fda529ca8.tar.gz
archiver: stamp-base is dead, remove it
stamp-base was only ever used by the shared workdir code in gcc. This turned out to be problematic and has been replaced by other approaches which don't need specialist bitbake knowledge. stamp-base will likely get removed from bitbake but for now, remove it from archiver to simplfy the code since gcc no longer uses it. This stops people getting confused by the obsolete code paths which I'm getting a lot of questions about. (From OE-Core rev: 4b9f70f03cbefe9db758500e3ad89f7a8ff8226e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass35
1 files changed, 3 insertions, 32 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 089d70748c..eec8024db7 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -99,27 +99,6 @@ python () {
99 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn) 99 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_patched' % pn)
100 elif ar_src == "configured": 100 elif ar_src == "configured":
101 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn) 101 d.appendVarFlag('do_package_write_rpm', 'depends', ' %s:do_ar_configured' % pn)
102
103 # The gcc staff uses shared source
104 flag = d.getVarFlag("do_unpack", "stamp-base", True)
105 if flag:
106 if ar_src in [ 'original', 'patched' ]:
107 ar_outdir = os.path.join(d.getVar('ARCHIVER_TOPDIR', True), 'work-shared')
108 d.setVar('ARCHIVER_OUTDIR', ar_outdir)
109 d.setVarFlag('do_ar_original', 'stamp-base', flag)
110 d.setVarFlag('do_ar_patched', 'stamp-base', flag)
111 d.setVarFlag('do_unpack_and_patch', 'stamp-base', flag)
112 d.setVarFlag('do_ar_original', 'vardepsexclude', 'PN PF ARCHIVER_OUTDIR WORKDIR')
113 d.setVarFlag('do_unpack_and_patch', 'vardepsexclude', 'PN PF ARCHIVER_OUTDIR WORKDIR')
114 d.setVarFlag('do_ar_patched', 'vardepsexclude', 'PN PF ARCHIVER_OUTDIR WORKDIR')
115 d.setVarFlag('create_diff_gz', 'vardepsexclude', 'PF')
116 d.setVarFlag('create_tarball', 'vardepsexclude', 'PF')
117
118 flag_clean = d.getVarFlag('do_unpack', 'stamp-base-clean', True)
119 if flag_clean:
120 d.setVarFlag('do_ar_original', 'stamp-base-clean', flag_clean)
121 d.setVarFlag('do_ar_patched', 'stamp-base-clean', flag_clean)
122 d.setVarFlag('do_unpack_and_patch', 'stamp-base-clean', flag_clean)
123} 102}
124 103
125# Take all the sources for a recipe and puts them in WORKDIR/archiver-work/. 104# Take all the sources for a recipe and puts them in WORKDIR/archiver-work/.
@@ -179,12 +158,7 @@ python do_ar_patched() {
179 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True) 158 ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
180 bb.note('Archiving the patched source...') 159 bb.note('Archiving the patched source...')
181 d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True)) 160 d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
182 # The gcc staff uses shared source 161 create_tarball(d, d.getVar('S', True), 'patched', ar_outdir)
183 flag = d.getVarFlag('do_unpack', 'stamp-base', True)
184 if flag:
185 create_tarball(d, d.getVar('S', True), 'patched', ar_outdir, 'gcc')
186 else:
187 create_tarball(d, d.getVar('S', True), 'patched', ar_outdir)
188} 162}
189 163
190python do_ar_configured() { 164python do_ar_configured() {
@@ -222,17 +196,14 @@ python do_ar_configured() {
222 create_tarball(d, srcdir, 'configured', ar_outdir) 196 create_tarball(d, srcdir, 'configured', ar_outdir)
223} 197}
224 198
225def create_tarball(d, srcdir, suffix, ar_outdir, pf=None): 199def create_tarball(d, srcdir, suffix, ar_outdir):
226 """ 200 """
227 create the tarball from srcdir 201 create the tarball from srcdir
228 """ 202 """
229 import tarfile 203 import tarfile
230 204
231 bb.utils.mkdirhier(ar_outdir) 205 bb.utils.mkdirhier(ar_outdir)
232 if pf: 206 tarname = os.path.join(ar_outdir, '%s-%s.tar.gz' % \
233 tarname = os.path.join(ar_outdir, '%s-%s.tar.gz' % (pf, suffix))
234 else:
235 tarname = os.path.join(ar_outdir, '%s-%s.tar.gz' % \
236 (d.getVar('PF', True), suffix)) 207 (d.getVar('PF', True), suffix))
237 208
238 srcdir = srcdir.rstrip('/') 209 srcdir = srcdir.rstrip('/')