Skip to contentSkip to conversation

package_manager.py: fix rootfs failure for package_deb with multilib enabled

PATCH In review Chen Qi 2 participants 3 messages Jan 29, 2015

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover package_manager.py: fix rootfs failure for package_deb with multilib enabled

The following changes since commit 2a775ebbb175dd70fc7228607c306d4ccb9e4ba4:

net-tools: Fix rerunning of do_patch task (2015-01-23 14:32:40 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/debian-multilib
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/debian-multilib

Chen Qi (1):
package_manager.py: fix rootfs failure with multilib enabled

 meta/lib/oe/package_manager.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

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

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.

---
 meta/lib/oe/package_manager.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/lib/oe/package_manager.py +4 -1
index 69100f1..6f49c69 100644
@@ -1723,9 +1723,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
#2 lore raw

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

Hi Chen,

I tested the patch and is ok can contain (when merge),

Also the same issue is presented in dizzy and the patch needs to be backported.

Best regards,
alimon

Quoted 31 lines · Chen Qi

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.

---
  meta/lib/oe/package_manager.py | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
meta/lib/oe/package_manager.py +4 -1
index 69100f1..6f49c69 100644
@@ -1723,9 +1723,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)