All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] fix package archs ordering for RPM
@ 2014-03-03  9:43 Laurentiu Palcu
  2014-03-03  9:43 ` [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds" Laurentiu Palcu
  2014-03-03  9:43 ` [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added Laurentiu Palcu
  0 siblings, 2 replies; 6+ messages in thread
From: Laurentiu Palcu @ 2014-03-03  9:43 UTC (permalink / raw)
  To: openembedded-core

This got messed up by me trying to fix a multilib problem using python sets.
Unfortunately sets do not keep the initial ordering and an image might end
up containing packages meant for other architectures... So, revert the offending
commit and fix the original issue by just checking if a channel was already added
or not.

laurentiu

The following changes since commit 8f36e1ef1afd10594391596391564e8904a840f2:

  poky.conf: add CentOS 6.5 to SANITY_TESTED_DISTROS (2014-02-28 18:05:47 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib lpalcu/b5890_rpm_pkg_arch_selection_logic_fix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/b5890_rpm_pkg_arch_selection_logic_fix

Laurentiu Palcu (2):
  Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib
    builds"
  package_manager.py: RpmPM: don't add smart channel if already added

 meta/lib/oe/package_manager.py |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds"
  2014-03-03  9:43 [PATCH 0/2] fix package archs ordering for RPM Laurentiu Palcu
@ 2014-03-03  9:43 ` Laurentiu Palcu
  2014-03-04 18:37   ` Kamble, Nitin A
  2014-03-03  9:43 ` [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added Laurentiu Palcu
  1 sibling, 1 reply; 6+ messages in thread
From: Laurentiu Palcu @ 2014-03-03  9:43 UTC (permalink / raw)
  To: openembedded-core

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(-)

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added
  2014-03-03  9:43 [PATCH 0/2] fix package archs ordering for RPM Laurentiu Palcu
  2014-03-03  9:43 ` [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds" Laurentiu Palcu
@ 2014-03-03  9:43 ` Laurentiu Palcu
  2014-03-03 15:02   ` Mark Hatle
  1 sibling, 1 reply; 6+ messages in thread
From: Laurentiu Palcu @ 2014-03-03  9:43 UTC (permalink / raw)
  To: openembedded-core

Make sure the channel was not already added, before attempting to add.

[YOCTO #5890]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/lib/oe/package_manager.py |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 6c133c3..ee42952 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -604,11 +604,11 @@ class RpmPM(PackageManager):
         # self._invoke_smart('config --set rpm-log-level=debug')
         # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
         # self._invoke_smart(cmd)
-
+        ch_already_added = []
         for canonical_arch in platform_extra:
             arch = canonical_arch.split('-')[0]
             arch_channel = os.path.join(self.deploy_dir, arch)
-            if os.path.exists(arch_channel):
+            if os.path.exists(arch_channel) and not arch in ch_already_added:
                 bb.note('Note: adding Smart channel %s (%s)' %
                         (arch, channel_priority))
                 self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
@@ -617,6 +617,8 @@ class RpmPM(PackageManager):
                                    (arch, channel_priority))
                 channel_priority -= 5
 
+                ch_already_added.append(arch)
+
         bb.note('adding Smart RPM DB channel')
         self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
 
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added
  2014-03-03  9:43 ` [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added Laurentiu Palcu
@ 2014-03-03 15:02   ` Mark Hatle
  2014-03-03 15:42     ` Laurentiu Palcu
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2014-03-03 15:02 UTC (permalink / raw)
  To: openembedded-core

On 3/3/14, 3:43 AM, Laurentiu Palcu wrote:
> Make sure the channel was not already added, before attempting to add.
>
> [YOCTO #5890]

When generating the rootfs/etc/rpm/platform file, the order should be in the 
order of highest to lowest priority as well.

Smart uses this order (via an RPM API) to help determine scores when two 
packages from repositories at the same priority (with different architectures) 
are selected.

--Mark

> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
>   meta/lib/oe/package_manager.py |    6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 6c133c3..ee42952 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -604,11 +604,11 @@ class RpmPM(PackageManager):
>           # self._invoke_smart('config --set rpm-log-level=debug')
>           # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
>           # self._invoke_smart(cmd)
> -
> +        ch_already_added = []
>           for canonical_arch in platform_extra:
>               arch = canonical_arch.split('-')[0]
>               arch_channel = os.path.join(self.deploy_dir, arch)
> -            if os.path.exists(arch_channel):
> +            if os.path.exists(arch_channel) and not arch in ch_already_added:
>                   bb.note('Note: adding Smart channel %s (%s)' %
>                           (arch, channel_priority))
>                   self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
> @@ -617,6 +617,8 @@ class RpmPM(PackageManager):
>                                      (arch, channel_priority))
>                   channel_priority -= 5
>
> +                ch_already_added.append(arch)
> +
>           bb.note('adding Smart RPM DB channel')
>           self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added
  2014-03-03 15:02   ` Mark Hatle
@ 2014-03-03 15:42     ` Laurentiu Palcu
  0 siblings, 0 replies; 6+ messages in thread
From: Laurentiu Palcu @ 2014-03-03 15:42 UTC (permalink / raw)
  To: Mark Hatle; +Cc: openembedded-core

Hi Mark,

On Mon, Mar 03, 2014 at 09:02:35AM -0600, Mark Hatle wrote:
> On 3/3/14, 3:43 AM, Laurentiu Palcu wrote:
> >Make sure the channel was not already added, before attempting to add.
> >
> >[YOCTO #5890]
> 
> When generating the rootfs/etc/rpm/platform file, the order should
> be in the order of highest to lowest priority as well.
> 
> Smart uses this order (via an RPM API) to help determine scores when
> two packages from repositories at the same priority (with different
> architectures) are selected.
Thanks for the info. This patchset should restore the behavior to the
one you describe. Python's sets messed up the order, so I reverted that
patch.

laurentiu
> 
> --Mark
> 
> >Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> >---
> >  meta/lib/oe/package_manager.py |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> >index 6c133c3..ee42952 100644
> >--- a/meta/lib/oe/package_manager.py
> >+++ b/meta/lib/oe/package_manager.py
> >@@ -604,11 +604,11 @@ class RpmPM(PackageManager):
> >          # self._invoke_smart('config --set rpm-log-level=debug')
> >          # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
> >          # self._invoke_smart(cmd)
> >-
> >+        ch_already_added = []
> >          for canonical_arch in platform_extra:
> >              arch = canonical_arch.split('-')[0]
> >              arch_channel = os.path.join(self.deploy_dir, arch)
> >-            if os.path.exists(arch_channel):
> >+            if os.path.exists(arch_channel) and not arch in ch_already_added:
> >                  bb.note('Note: adding Smart channel %s (%s)' %
> >                          (arch, channel_priority))
> >                  self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
> >@@ -617,6 +617,8 @@ class RpmPM(PackageManager):
> >                                     (arch, channel_priority))
> >                  channel_priority -= 5
> >
> >+                ch_already_added.append(arch)
> >+
> >          bb.note('adding Smart RPM DB channel')
> >          self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
> >
> >
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds"
  2014-03-03  9:43 ` [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds" Laurentiu Palcu
@ 2014-03-04 18:37   ` Kamble, Nitin A
  0 siblings, 0 replies; 6+ messages in thread
From: Kamble, Nitin A @ 2014-03-04 18:37 UTC (permalink / raw)
  To: Palcu, Laurentiu, openembedded-core



> -----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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-04 18:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03  9:43 [PATCH 0/2] fix package archs ordering for RPM Laurentiu Palcu
2014-03-03  9:43 ` [PATCH 1/2] Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds" Laurentiu Palcu
2014-03-04 18:37   ` Kamble, Nitin A
2014-03-03  9:43 ` [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added Laurentiu Palcu
2014-03-03 15:02   ` Mark Hatle
2014-03-03 15:42     ` Laurentiu Palcu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.