All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: bitbake-dev@lists.berlios.de
Subject: Re: [PATCH] Allow % as wildcard in the end of PREFERRED_VERSION_pkg
Date: Tue, 15 Sep 2009 11:16:26 +0200	[thread overview]
Message-ID: <20090915091626.GH4970@jama> (raw)
In-Reply-To: <1253002300.4490.1103.camel@lenovo.internal.reciva.com>

On Tue, Sep 15, 2009 at 09:11:40AM +0100, Phil Blundell wrote:
> On Mon, 2009-09-14 at 00:43 +0200, Martin Jansa wrote:
> > +def isPreferredVersion(pe, pv, pr, preferred_e, preferred_v, preferred_r):
> > +    """
> > +    Check if the version pe,pv,pr is the preferred one.
> > +    If there is preferred version defined and ends with '%', then pv has to start with that version after removing the '%' in the end,
> > +    """
> >  
> > +    if (pv == preferred_v or (preferred_v != None and preferred_v.endswith('%') and pv.startswith(preferred_v[:len(preferred_v)-1]))):
> > +        if (pr == preferred_r or preferred_r == None):
> > +            if (pe == preferred_e or preferred_e == None):
> > +                return true
> > +    return false
> > +    
> 
> I'm not totally comfortable that this patch is semantically well-formed.
> If you start allowing wildcards then the idea of "the preferred version"
> becomes somewhat ill-defined since, obviously, the wildcard might match
> any number of files.  I'm not quite sure what the problem is that you
> are trying to solve, but my initial reaction is that (whatever the
> problem is) it would probably be better solved another way.
> 
> p.

I wrote a bit more about my problem here:
http://article.gmane.org/gmane.comp.handhelds.openembedded/25986

Simply:
If I want to prefer bbfile with
PV=1.0+gitr${SRCPV}
then PV will change with every commit
so what PV should be in PREFERRED_VERSION_pkg?

With this patch I can put there "1.0+git%" which will match just this
one bbfile.

-- 
uin:136542059                jid:Martin.Jansa@gmail.com
Jansa Martin                 sip:jamasip@voip.wengo.fr 
JaMa                         



  reply	other threads:[~2009-09-15  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13 22:43 [PATCH] Allow % as wildcard in the end of PREFERRED_VERSION_pkg Martin Jansa
2009-09-13 23:08 ` Martin Jansa
2009-09-14 16:39   ` Otavio Salvador
2009-09-14 21:31     ` Martin Jansa
2009-09-15  8:11 ` Phil Blundell
2009-09-15  9:16   ` Martin Jansa [this message]
2009-09-15 10:31     ` Phil Blundell
2009-09-15 11:56       ` Martin Jansa
2009-09-15 13:38         ` Phil Blundell
2009-09-15 13:23   ` Richard Purdie
2010-01-21 10:34 ` [Bitbake-dev] " 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=20090915091626.GH4970@jama \
    --to=martin.jansa@gmail.com \
    --cc=bitbake-dev@lists.berlios.de \
    --cc=openembedded-devel@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 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.