Skip to contentSkip to conversation

package_manager.py: fix rootfs failure with multilib enabled

PATCH New Aníbal Limón 1 participant 1 message Feb 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package_manager.py: fix rootfs failure with multilib enabled

From: Chen Qi <[email protected]>

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)

---
 meta/lib/oe/package_manager.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/lib/oe/package_manager.py +4 -1
index 8609156..9657d3b 100644
@@ -1722,9 +1722,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)
Signature · 1 line
1.9.1