Patchwork [1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds"

login
register
mail settings
Submitter Laurentiu Palcu
Date March 3, 2014, 9:43 a.m.
Message ID <0d516ff4d652cf74a5a43106f46321ff52c97900.1393839480.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/67843/
State New
Headers show

Comments

Laurentiu Palcu - March 3, 2014, 9:43 a.m.
Converting a list to a set does not keep the order of the items, as they
were added, which might result in the wrong packages being installed in
the final image...

This reverts commit 12f47c23df8c109676f66d580d666a3147f3b046.

[YOCTO #5890]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/lib/oe/package_manager.py |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
Nitin A Kamble - March 4, 2014, 6:37 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of Laurentiu Palcu
> Sent: Monday, March 03, 2014 1:44 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/2] Revert "lib/oe/package_manager.py:
> RpmPM: fix issue with multilib builds"
> 
> Converting a list to a set does not keep the order of the items, as they were
> added, which might result in the wrong packages being installed in the final
> image...
> 
> This reverts commit 12f47c23df8c109676f66d580d666a3147f3b046.
> 
> [YOCTO #5890]
> 
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Acked-By: Nitin A Kamble <nitin.a.kamble@intel.com>

This resolves the packaging issues I was seeing.
Thanks,
Nitin


> ---
>  meta/lib/oe/package_manager.py |   13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/lib/oe/package_manager.py
> b/meta/lib/oe/package_manager.py index ff4f1de..6c133c3 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -368,18 +368,19 @@ class RpmPM(PackageManager):
>                                  self.ml_os_list['default'])
> 
>          # List must be prefered to least preferred order
> -        default_platform_extra = set()
> -        platform_extra = set()
> +        default_platform_extra = list()
> +        platform_extra = list()
>          bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
>          for mlib in self.ml_os_list:
>              for arch in self.ml_prefix_list[mlib]:
>                  plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
>                  if mlib == bbextendvariant:
> -                        default_platform_extra.add(plt)
> +                    if plt not in default_platform_extra:
> +                        default_platform_extra.append(plt)
>                  else:
> -                        platform_extra.add(plt)
> -
> -        platform_extra = platform_extra.union(default_platform_extra)
> +                    if plt not in platform_extra:
> +                        platform_extra.append(plt)
> +        platform_extra = default_platform_extra + platform_extra
> 
>          self._create_configs(platform, platform_extra)
> 
> --
> 1.7.9.5
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index ff4f1de..6c133c3 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -368,18 +368,19 @@  class RpmPM(PackageManager):
                                 self.ml_os_list['default'])
 
         # List must be prefered to least preferred order
-        default_platform_extra = set()
-        platform_extra = set()
+        default_platform_extra = list()
+        platform_extra = list()
         bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
         for mlib in self.ml_os_list:
             for arch in self.ml_prefix_list[mlib]:
                 plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
                 if mlib == bbextendvariant:
-                        default_platform_extra.add(plt)
+                    if plt not in default_platform_extra:
+                        default_platform_extra.append(plt)
                 else:
-                        platform_extra.add(plt)
-
-        platform_extra = platform_extra.union(default_platform_extra)
+                    if plt not in platform_extra:
+                        platform_extra.append(plt)
+        platform_extra = default_platform_extra + platform_extra
 
         self._create_configs(platform, platform_extra)