All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: debian.bbclass issues when some package is substring of another
Date: Tue, 15 Feb 2011 11:36:27 +0100	[thread overview]
Message-ID: <20110215103626.GF8619@localhost.jama.net> (raw)
In-Reply-To: <1297765171.2178.109.camel@phil-desktop>

[-- Attachment #1: Type: text/plain, Size: 3230 bytes --]

On Tue, Feb 15, 2011 at 10:19:31AM +0000, Phil Blundell wrote:
> On Tue, 2011-02-15 at 10:15 +0100, Martin Jansa wrote:
> > On Mon, Feb 14, 2011 at 03:27:23PM +0000, Phil Blundell wrote:
> > > b) switch to a two-phase approach where it first renames all the
> > > libraries themselves, then uses some heuristic to match the remaining
> > > packages against the libraries and apply an appropriate renaming to
> > > them.  Probably just matching on longest substring would be good enough
> > > here.
> > > 
> > > I think (b) is probably a better solution although it would be a little
> > > harder to implement.
> > 
> > I'll try (b), but imho you have same problem there (if you have
> > -dev/-dbg for such package names and they are in wrong order, even worse ie:
> > PKG_ncurses-libncurses-dev, libncurses-dev    <= ok
> > PKG_ncurses-libncursesw-dev, libncursesw-dev  <= works only because
> >   ncurses-libncursesw is mapped to libncursesw which is the same like
> >   s/ncurses-libncurses/libncurses
> > 
> > but if you imagine stranger situation with SONAMES which are not
> > substrings of each other in package names which are substrings, like:
> > ncurses-libncurses > libncurses
> > ncurses-libncursesw > libwidecurses
> > 
> > then still
> > PKG_ncurses-libncurses-dev, libncurses-dev    <= ok
> > PKG_ncurses-libncursesw-dev, libncursesw-dev  <= bad, because libwidecurses-dev was expected 
> > 
> > and later you won't find ncurses-libncursesw-dev to replace
> > ncurses-libncursesw with libwidecurses
> 
> I'm not quite sure I understand the difficulty here.

Ah sorry, I didn't read your (b) properly, now I see last sentence about
"longest substring".

But that's mostly what reverse sorted patch does now, isn't it? Longer
patterns are replaced before their shorter substrings (which then
matches only to their proper packages, because longer were already
replaced while handling longer pattern and "normally" doesn't match
anymore).

Regards,

> If I understand right you're talking about two output packages,
> "ncurses" and "ncursesw", which contain sonames "libncurses.so.5" and
> "libwidecurses.so.5", right?  In that case, during the first phase you'd
> get:
> 
> PKG_ncurses = "libncurses5"
> PKG_ncursesw = "libwidecurses5"
> 
> and a dictionary of renames performed which would look a bit like:
> 
> ncurses: { pkgname: libncurses5, devname: libncurses }
> ncursesw: { pkgname: libwidecurses5, devname: libwidecurses }
> 
> which is all expected.  Then, during the second phase, you'd consider
> the other packages like ncurses-dev and ncursesw-dev.  In this case, the
> longest prefix match for ncurses-dev in the dictionary is "ncurses", so
> it'd get renamed to libncurses-dev.  The longest matching prefix for
> ncursesw-dev in the dictionary is "ncursesw", so it'd get renamed to
> libwidecurses-dev.  That all seems like it should work out fine.
> 
> p.
> 
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2011-02-15 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 10:22 debian.bbclass issues when some package is substring of another Martin Jansa
2011-02-14 11:45 ` Martin Jansa
2011-02-14 15:27 ` Phil Blundell
2011-02-15  9:15   ` Martin Jansa
2011-02-15  9:42     ` [PATCH] debian.bbclass: call auto_libname in reverse sorted AUTO_LIBNAME_PKGS Martin Jansa
2011-02-15 10:06     ` debian.bbclass issues when some package is substring of another Martin Jansa
2011-02-15 10:19     ` Phil Blundell
2011-02-15 10:36       ` Martin Jansa [this message]
2011-02-17 16:33         ` Phil Blundell

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=20110215103626.GF8619@localhost.jama.net \
    --to=martin.jansa@gmail.com \
    --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.