Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] package_manager.py: RpmPM: don't add smart channel if already added
Date: Mon, 3 Mar 2014 09:02:35 -0600	[thread overview]
Message-ID: <5314998B.8050102@windriver.com> (raw)
In-Reply-To: <bb06f92710d0567d5019cf13d6c11caa1fc91d32.1393839480.git.laurentiu.palcu@intel.com>

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



  reply	other threads:[~2014-03-03 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-03-03 15:42     ` Laurentiu Palcu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5314998B.8050102@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox