Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] opkg 0.1.8: respect to the arch when choose the alternatives
Date: Sat, 26 May 2012 13:24:18 +0800	[thread overview]
Message-ID: <4FC06902.4020605@windriver.com> (raw)
In-Reply-To: <fad645aa59e8cc5634500b35bc607e0b61dc997f.1337933617.git.liezhi.yang@windriver.com>


I'm sorry that I forgot to update the PR bump, I've updated it
for both opkg_0.1.8.bb and opkg_svn.bb:

-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"

and pushed the updated patch to:
   git://git.pokylinux.org/poky-contrib robert/ipk_arch
   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/ipk_arch

// Robert

On 05/25/2012 06:02 PM, Robert Yang wrote:
> There is a bug if we:
> 1) bitbake core-image-sato-sdk MACHINE=qemux86
> 2) bitbake core-image-sato with MACHINE=crownbay
>
> Then several pkgs in deploy/ipk/i586 would be installed to crownbay's
> image even if there is one in deploy/ipk/core2 and we have set the
> core2's priority higher than i586, when the version in deploy/ipk/i586 is
> higher. This doesn't work for us, for example, what the crownbay need is
> xserver-xorg-1.9.3, but it installs xserver-xorg-1.11.2.
>
> This is caused by opkg's selecting mechanism, if there are more than one
> candidates which have the same pkg name in the candidate list, for
> example, the same pkg with different versions, then it will use the last
> one which is the highest version in the list, this doesn't work for us,
> it should respect to the arch priorities in such a case.
>
> This is for both denzil and master branch.
>
> [YOCTO #2360]
>
> Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
> ---
>   .../opkg/opkg/respect-to-arch.patch                |   47 ++++++++++++++++++++
>   meta/recipes-devtools/opkg/opkg_0.1.8.bb           |    1 +
>   meta/recipes-devtools/opkg/opkg_svn.bb             |    1 +
>   3 files changed, 49 insertions(+), 0 deletions(-)
>   create mode 100644 meta/recipes-devtools/opkg/opkg/respect-to-arch.patch
>
> diff --git a/meta/recipes-devtools/opkg/opkg/respect-to-arch.patch b/meta/recipes-devtools/opkg/opkg/respect-to-arch.patch
> new file mode 100644
> index 0000000..6f4537f
> --- /dev/null
> +++ b/meta/recipes-devtools/opkg/opkg/respect-to-arch.patch
> @@ -0,0 +1,47 @@
> +pkg_hash.c: respect to the arch priorities when good_pkg_by_name
> +
> +If there are more than one candidates which have the same pkg name in
> +the candidate list, for example, the same pkg with different versions,
> +then it will use the last one which is the highest version in the list,
> +it should respect to the arch priorities in such a case.
> +
> +Upstream Status: Pending
> +
> +Signed-off-by: Robert Yang<liezhi.yang@windriver.com>
> +---
> + libopkg/pkg_hash.c |   18 +++++++++++++++---
> + 1 files changed, 15 insertions(+), 3 deletions(-)
> +
> +diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c
> +index a99cf6b..cc048c8 100644
> +--- a/libopkg/pkg_hash.c
> ++++ b/libopkg/pkg_hash.c
> +@@ -376,10 +376,22 @@ pkg_hash_fetch_best_installation_candidate(abstract_pkg_t *apkg,
> +           if (constraint_fcn(matching, cdata)) {
> +              opkg_msg(DEBUG, "Candidate: %s %s.\n",
> + 			     matching->name, matching->version) ;
> +-             good_pkg_by_name = matching;
> ++             /* Respect to the arch priorities when given alternatives */
> ++             if (good_pkg_by_name) {
> ++                 if (matching->arch_priority>= good_pkg_by_name->arch_priority) {
> ++                     good_pkg_by_name = matching;
> ++                     opkg_msg(DEBUG, "%s %s wins by priority.\n",
> ++                         matching->name, matching->version) ;
> ++                 } else
> ++                     opkg_msg(DEBUG, "%s %s wins by priority.\n",
> ++                         good_pkg_by_name->name, good_pkg_by_name->version) ;
> ++             } else
> ++                 good_pkg_by_name = matching;
> + 	     /* It has been provided by hand, so it is what user want */
> +-             if (matching->provided_by_hand == 1)
> +-                break;
> ++             if (matching->provided_by_hand == 1) {
> ++                 good_pkg_by_name = matching;
> ++                 break;
> ++             }
> +           }
> +      }
> +
> +--
> +1.7.1
> +
> diff --git a/meta/recipes-devtools/opkg/opkg_0.1.8.bb b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
> index c206b37..5161824 100644
> --- a/meta/recipes-devtools/opkg/opkg_0.1.8.bb
> +++ b/meta/recipes-devtools/opkg/opkg_0.1.8.bb
> @@ -3,6 +3,7 @@ require opkg.inc
>   SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
>              file://add_vercmp.patch \
>              file://headerfix.patch \
> +           file://respect-to-arch.patch \
>             "
>
>   PR = "${INC_PR}.0"
> diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
> index c07d393..c3ed973 100644
> --- a/meta/recipes-devtools/opkg/opkg_svn.bb
> +++ b/meta/recipes-devtools/opkg/opkg_svn.bb
> @@ -6,6 +6,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
>              file://fix_installorder.patch \
>              file://offline_postinstall.patch\
>              file://track_parents.patch \
> +           file://respect-to-arch.patch \
>   "
>
>   S = "${WORKDIR}/trunk"



  parent reply	other threads:[~2012-05-26  5:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 10:02 [PATCH 0/1] opkg 0.1.8: respect to the arch when choose the alternatives Robert Yang
2012-05-25 10:02 ` [PATCH 1/1] " Robert Yang
2012-05-25 11:19   ` Koen Kooi
2012-05-25 11:30     ` Martin Jansa
2012-05-25 14:09       ` Richard Purdie
2012-05-26  2:47       ` Robert Yang
2012-05-26  2:54         ` Robert Yang
2012-05-26  6:28         ` Martin Jansa
2012-05-26  8:07           ` Koen Kooi
2012-05-26  8:47             ` Robert Yang
2012-05-26  8:15           ` Robert Yang
2012-05-26  8:19             ` Martin Jansa
2012-05-26  8:35               ` Robert Yang
2012-05-26  8:42                 ` Martin Jansa
2012-05-26  2:25     ` Robert Yang
2012-05-26  5:24   ` Robert Yang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-05-31 14:13 [PATCH 0/1] V2 " Robert Yang
2012-05-31 14:13 ` [PATCH 1/1] " Robert Yang
2012-05-31 15:01   ` Koen Kooi
2012-06-01  0:23     ` Robert Yang
2012-06-01  8:17     ` Richard Purdie
2012-06-01  9:04       ` Koen Kooi
2012-06-01 10:02         ` Richard Purdie
2012-06-01 10:35           ` Koen Kooi
2012-06-04  9:31             ` Robert Yang
2012-06-04 10:39               ` Martin Jansa
2012-06-04 14:38                 ` Koen Kooi

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=4FC06902.4020605@windriver.com \
    --to=liezhi.yang@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