]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_manager.py: fix rootfs failure with multilib enabled
authorChen Qi <Qi.Chen@windriver.com>
Tue, 3 Feb 2015 20:53:39 +0000 (14:53 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Apr 2015 21:38:33 +0000 (22:38 +0100)
With the current code, if we use debian package backend and enable
multilib support, the do_rootfs process would always fail with error
messages like below.

    E: Unable to locate package packagegroup-core-boot

This patch fixes the above problem.

(From OE-Core rev: d140d556ae30b6dbd0ffce8882c3e22b17050820)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oe/package_manager.py

index 411b9d6309dfb02366c9a3033caabd9cbd2d5ed7..505509543dab1f43f95b51f1972e1c221717fe2b 100644 (file)
@@ -1725,9 +1725,12 @@ class DpkgPM(PackageManager):
             with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
                 for line in apt_conf_sample.read().split("\n"):
                     match_arch = re.match("  Architecture \".*\";$", line)
+                    architectures = ""
                     if match_arch:
                         for base_arch in base_arch_list:
-                            apt_conf.write("  Architecture \"%s\";\n" % base_arch)
+                            architectures += "\"%s\";" % base_arch
+                        apt_conf.write("  Architectures {%s};\n" % architectures);
+                        apt_conf.write("  Architecture \"%s\";\n" % base_archs)
                     else:
                         line = re.sub("#ROOTFS#", self.target_rootfs, line)
                         line = re.sub("#APTCONF#", self.apt_conf_dir, line)