summaryrefslogtreecommitdiffstats
path: root/meta/classes/packagefeed-stability.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/packagefeed-stability.bbclass')
-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