Skip to contentSkip to conversation

package_manager: Ensure we don't process directories twice

PATCH New Richard Purdie 1 participant 1 message Mar 26, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package_manager: Ensure we don't process directories twice

Processing directories twice is both pointless and introduces a race condition. When building the list, ensure duplicates (like "all" and "noarch") are handled correctly.

---

meta/lib/oe/package_manager.py +3 -1
index 0cdf3b0..692528d 100644
@@ -178,7 +178,9 @@ class DpkgIndexer(Indexer):
             arch_list = pkg_archs.split()
         sdk_pkg_archs = self.d.getVar('SDK_PACKAGE_ARCHS', True)
         if sdk_pkg_archs is not None:
-            arch_list += sdk_pkg_archs.split()
+            for a in sdk_pkg_archs.split():
+                if a not in pkg_archs:
+                    arch_list.append(a)
 
         apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
         gzip = bb.utils.which(os.getenv('PATH'), "gzip")