summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-07-27 00:51:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-10 10:46:33 +0100
commita960d9b40129394e98924481ba84a005fbe1dce1 (patch)
tree4979c16b4628e107ee0bfeca68b5423c736318b1 /meta
parentce8e654e2cb23b49e5ce85e6f2ebbff558b4e537 (diff)
downloadpoky-a960d9b40129394e98924481ba84a005fbe1dce1.tar.gz
packagefeed-stability.bbclass: fix multilib + rpm
* Fix multilib + rpm since its multilib package name is special. * Update SSTATE_DUPWHITELIST to avoid shared location conflicted error. * Fix message when "not copying", now the messages are: Copying packages for recipe <foo> Not copying packages for recipe <foo> (From OE-Core rev: 647fc7913c3d1f98efe36f01fd4e0edf2366e1a6) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/packagefeed-stability.bbclass16
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/classes/packagefeed-stability.bbclass b/meta/classes/packagefeed-stability.bbclass
index df4c2babb6..bcd3e4448b 100644
--- a/meta/classes/packagefeed-stability.bbclass
+++ b/meta/classes/packagefeed-stability.bbclass
@@ -56,8 +56,11 @@ python() {
56 continue 56 continue
57 57
58 if deploydirvarref in sstate_outputdirs: 58 if deploydirvarref in sstate_outputdirs:
59 deplor_dir_pkgtype = d.expand(deploydirvarref + '-prediff')
59 # Set intermediate output directory 60 # Set intermediate output directory
60 d.setVarFlag(pkgwritefunc, 'sstate-outputdirs', sstate_outputdirs.replace(deploydirvarref, deploydirvarref + '-prediff')) 61 d.setVarFlag(pkgwritefunc, 'sstate-outputdirs', sstate_outputdirs.replace(deploydirvarref, deplor_dir_pkgtype))
62 # Update SSTATE_DUPWHITELIST to avoid shared location conflicted error
63 d.appendVar('SSTATE_DUPWHITELIST', ' %s' % deplor_dir_pkgtype)
61 64
62 d.setVar(pkgcomparefunc, d.getVar('do_package_compare', False)) 65 d.setVar(pkgcomparefunc, d.getVar('do_package_compare', False))
63 d.setVarFlags(pkgcomparefunc, d.getVarFlags('do_package_compare', False)) 66 d.setVarFlags(pkgcomparefunc, d.getVarFlags('do_package_compare', False))
@@ -135,6 +138,7 @@ def package_compare_impl(pkgtype, d):
135 files = [] 138 files = []
136 docopy = False 139 docopy = False
137 manifest, _ = oe.sstatesig.sstate_get_manifest_filename(pkgwritetask, d) 140 manifest, _ = oe.sstatesig.sstate_get_manifest_filename(pkgwritetask, d)
141 mlprefix = d.getVar('MLPREFIX', True)
138 # Copy recipe's all packages if one of the packages are different to make 142 # Copy recipe's all packages if one of the packages are different to make
139 # they have the same PR. 143 # they have the same PR.
140 with open(manifest, 'r') as f: 144 with open(manifest, 'r') as f:
@@ -150,6 +154,8 @@ def package_compare_impl(pkgtype, d):
150 pkgbasename = os.path.basename(destpath) 154 pkgbasename = os.path.basename(destpath)
151 pkgname = None 155 pkgname = None
152 for rpkg, pkg in rpkglist: 156 for rpkg, pkg in rpkglist:
157 if mlprefix and pkgtype == 'rpm' and rpkg.startswith(mlprefix):
158 rpkg = rpkg[len(mlprefix):]
153 if pkgbasename.startswith(rpkg): 159 if pkgbasename.startswith(rpkg):
154 pkgr = pkgrvalues[pkg] 160 pkgr = pkgrvalues[pkg]
155 destpathspec = destpath.replace(pkgr, '*') 161 destpathspec = destpath.replace(pkgr, '*')
@@ -205,6 +211,12 @@ def package_compare_impl(pkgtype, d):
205 for pkgname, pkgbasename, srcpath, destpath in files: 211 for pkgname, pkgbasename, srcpath, destpath in files:
206 destdir = os.path.dirname(destpath) 212 destdir = os.path.dirname(destpath)
207 bb.utils.mkdirhier(destdir) 213 bb.utils.mkdirhier(destdir)
214 # Remove allarch rpm pkg if it is already existed (for
215 # multilib), they're identical in theory, but sstate.bbclass
216 # copies it again, so keep align with that.
217 if os.path.exists(destpath) and pkgtype == 'rpm' \
218 and d.getVar('PACKAGE_ARCH', True) == 'all':
219 os.unlink(destpath)
208 if (os.stat(srcpath).st_dev == os.stat(destdir).st_dev): 220 if (os.stat(srcpath).st_dev == os.stat(destdir).st_dev):
209 # Use a hard link to save space 221 # Use a hard link to save space
210 os.link(srcpath, destpath) 222 os.link(srcpath, destpath)
@@ -212,7 +224,7 @@ def package_compare_impl(pkgtype, d):
212 shutil.copyfile(srcpath, destpath) 224 shutil.copyfile(srcpath, destpath)
213 f.write('%s\n' % destpath) 225 f.write('%s\n' % destpath)
214 else: 226 else:
215 bb.plain('Not copying packages for %s' % pn) 227 bb.plain('Not copying packages for recipe %s' % pn)
216 228
217do_cleanall_append() { 229do_cleanall_append() {
218 import errno 230 import errno