summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2016-01-06 04:21:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:31 +0000
commit4aeb69d35f1fe3b4882160c5c4884a5ab808f601 (patch)
treeb108e7e75e52590b45ad06aa1c2b1225a7219d9b /meta
parent9ea7428e67a764185349bd5dd5ddafd1c33c3290 (diff)
downloadpoky-4aeb69d35f1fe3b4882160c5c4884a5ab808f601.tar.gz
package_manager.py: fixes for multilib deb packaging builds
* tmp/deploy/deb subdirectories do not get hyphens replaced with underscores, so don't do that translation when building the sources list. * Fix MULTILIB_VARIANTS handling to be more general and work for all architectures * Also include a fix for a warning generated by apt due to missing apt/preferences.d directory. (From OE-Core rev: c3ee9b12ae704eadf02ff288d8035b5885d6218e) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.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/lib/oe/package_manager.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 32afeaf514..bc397213ae 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -247,7 +247,7 @@ class DpkgIndexer(Indexer):
247 if a not in pkg_archs: 247 if a not in pkg_archs:
248 arch_list.append(a) 248 arch_list.append(a)
249 249
250 all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split() 250 all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
251 arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list) 251 arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
252 252
253 apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive") 253 apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
@@ -1775,7 +1775,7 @@ class DpkgPM(PackageManager):
1775 self.apt_args = d.getVar("APT_ARGS", True) 1775 self.apt_args = d.getVar("APT_ARGS", True)
1776 1776
1777 self.all_arch_list = archs.split() 1777 self.all_arch_list = archs.split()
1778 all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split() 1778 all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
1779 self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list) 1779 self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
1780 1780
1781 self._create_configs(archs, base_archs) 1781 self._create_configs(archs, base_archs)
@@ -1966,6 +1966,7 @@ class DpkgPM(PackageManager):
1966 bb.utils.mkdirhier(self.apt_conf_dir) 1966 bb.utils.mkdirhier(self.apt_conf_dir)
1967 bb.utils.mkdirhier(self.apt_conf_dir + "/lists/partial/") 1967 bb.utils.mkdirhier(self.apt_conf_dir + "/lists/partial/")
1968 bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/") 1968 bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
1969 bb.utils.mkdirhier(self.apt_conf_dir + "/preferences.d/")
1969 1970
1970 arch_list = [] 1971 arch_list = []
1971 for arch in self.all_arch_list: 1972 for arch in self.all_arch_list:
@@ -2000,10 +2001,14 @@ class DpkgPM(PackageManager):
2000 base_arch_list = base_archs.split() 2001 base_arch_list = base_archs.split()
2001 multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True); 2002 multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True);
2002 for variant in multilib_variants.split(): 2003 for variant in multilib_variants.split():
2003 if variant == "lib32": 2004 localdata = bb.data.createCopy(self.d)
2004 base_arch_list.append("i386") 2005 variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
2005 elif variant == "lib64": 2006 orig_arch = localdata.getVar("DPKG_ARCH", True)
2006 base_arch_list.append("amd64") 2007 localdata.setVar("DEFAULTTUNE", variant_tune)
2008 bb.data.update_data(localdata)
2009 variant_arch = localdata.getVar("DPKG_ARCH", True)
2010 if variant_arch not in base_arch_list:
2011 base_arch_list.append(variant_arch)
2007 2012
2008 with open(self.apt_conf_file, "w+") as apt_conf: 2013 with open(self.apt_conf_file, "w+") as apt_conf:
2009 with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample: 2014 with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample: