Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Yu Ke <ke.yu@intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 5/6] ghostscript: Fixed the incorrect DEPENDS.
Date: Mon, 08 Aug 2011 13:47:36 +0100	[thread overview]
Message-ID: <1312807656.14274.178.camel@rex> (raw)
In-Reply-To: <4E3FA84A.5030600@intel.com>

On Mon, 2011-08-08 at 17:11 +0800, Yu Ke wrote:
> on 2011-8-5 18:37, Lianhao Lu wrote:
> > [YOCTO #1337]
> > Using ghostscript-native instead of ${PN}-native in DEPENDS to correct
> > the invalid DEPENDS in multilib cases.
> >
> > Signed-off-by: Lianhao Lu<lianhao.lu@intel.com>
> > ---
> >   .../ghostscript/ghostscript_9.02.bb                |    2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.02.bb b/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
> > index 28c6c9e..2e46734 100644
> > --- a/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
> > +++ b/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
> > @@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
> >
> >   PR = "r4"
> >
> > -DEPENDS = "${PN}-native tiff jpeg fontconfig cups"
> > +DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
> >   DEPENDS_virtclass-native = ""
> >
> >   SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.bz2"
> 
> This looks a generic issue to me. i.e. when the dependency ends with 
> "-native", we should make sure it won't has multilib prefix. so the 
> following patch will be more generic. or at least, we should document 
> somewhere that "${PN}-native" dependency is not right.
> 
> diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
> index 6e1669f..c73e5f9 100644
> --- a/meta/classes/multilib.bbclass
> +++ b/meta/classes/multilib.bbclass
> @@ -43,7 +43,11 @@ python __anonymous () {
>           newdeps = []
>           for dep in deps:
>               if dep.endswith(("-native", "-native-runtime")):
> -                newdeps.append(dep)
> +                if dep.startswith(variant):
> +                    # remove the leading MLPREFIX
> +                    newdeps.append(dep[len(variant)+1:])
> +                else:
> +                    newdeps.append(dep)
>               else:
>                   newdeps.append(extend_name(dep))
>           d.setVar(varname, " ".join(newdeps))
> 
> comment? if it is Ok, I will submit a patch.

I'm not sure I like this. I think fixing the individual recipes to use
BPN instead of PN might be a better way to handle this.

We could also error upon detecting this situation instead of magically
fixing it up as above...

Cheers,

Richard




  reply	other threads:[~2011-08-08 12:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 10:37 [PATCH 0/6] Variable fixes for multilib Lianhao Lu
2011-08-05 10:37 ` [PATCH 1/6] SRC_URI: Using BPN instaed of PN Lianhao Lu
2011-08-05 10:37 ` [PATCH 2/6] tcp-wrappers: Using ${PN} in PACKAGES Lianhao Lu
2011-08-05 10:37 ` [PATCH 3/6] qt4x11.bbclass: Using BPN instead of PN Lianhao Lu
2011-08-05 10:37 ` [PATCH 4/6] Misc: Corrected the dependency on non-native for -native package Lianhao Lu
2011-08-05 10:37 ` [PATCH 5/6] ghostscript: Fixed the incorrect DEPENDS Lianhao Lu
2011-08-08  9:11   ` Yu Ke
2011-08-08 12:47     ` Richard Purdie [this message]
2011-08-05 10:37 ` [PATCH 6/6] eglibc-locale: Added ${MLPREFIX} for task dependency Lianhao Lu
2011-08-05 16:30 ` [PATCH 0/6] Variable fixes for multilib Richard Purdie

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=1312807656.14274.178.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=ke.yu@intel.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