[oe] debian.bbclass issues when some package is substring of another

Martin Jansa martin.jansa at gmail.com
Tue Feb 15 09:15:17 UTC 2011


On Mon, Feb 14, 2011 at 03:27:23PM +0000, Phil Blundell wrote:
> On Mon, 2011-02-14 at 11:22 +0100, Martin Jansa wrote:
> > So can someone explain why we need that 'newpkg = pkg.replace(orig_pkg, devname, 1)' in else?
> 
> If that line was removed altogether then the -dev packages (and -doc,
> -bin, ...) would stop being renamed, which wouldn't be a very good
> thing.  In other words, you'd get libncurses5 but ncurses-dev (not
> libncurses5-dev) etc.

That's not really what you get currently, but ok I see your point in keeping
that "else".

Currently you would get libncurses-dev without 5, because it replaces
with devname not pkgname.

> 
> However you're right that the logic as it stands does look fairly
> broken.  Two ways of fixing it come to mind:
> 
> a) have it explicitly search for (and rename) [orig_pkg]-dev,
> [orig_pkg]-doc etc, and remove the catch-all altogether; or
> 
> 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

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20110215/da388606/attachment-0002.sig>


More information about the Openembedded-devel mailing list