All of lore.kernel.org
 help / color / mirror / Atom feed
* debian.bbclass issues when some package is substring of another
@ 2011-02-14 10:22 Martin Jansa
  2011-02-14 11:45 ` Martin Jansa
  2011-02-14 15:27 ` Phil Blundell
  0 siblings, 2 replies; 9+ messages in thread
From: Martin Jansa @ 2011-02-14 10:22 UTC (permalink / raw)
  To: openembedded-devel

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

After last rebuild from scratch I got
Package libncursesw (5.7+20110115-r16.6)
instead of expected
Package libncursesw5 (5.7+20110115-r16.6)
which I had before (and which is _still_ in depends of packages needing
it - like ie screen)

I started to debug debian.bbclass to see why
libncursesw is no longer renamed to libncursesw5 and found that it's
because also libncurses exists and it's replaced in both and then
replacement for libncursesw doesn't match anymore. Same issue with
libtic/libticw.

Problem is that when checking libtic:
./log:DEBUG: LIBNAMES: pkg ncurses-libtic socrunc ('libtic5', 'libtic')
./log:DEBUG: LIBNAMES: pkgname libtic5 devname libtic

./log:DEBUG: LIBNAMES: pkg ncurses-libtic == orig_pkg ncurses-libtic
./log:DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libtic orig_pkg ncurses-libtic debian_pn None newpkg libtic5
./log:DEBUG: setVar PKG_ncurses-libtic, libtic5
but also
./log:DEBUG: LIBNAMES: else pkg ncurses-libticw.replace(ncurses-libtic,libtic)
./log:DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
./log:DEBUG: setVar PKG_ncurses-libticw, libticw

so later when checking libticw
./log:DEBUG: LIBNAMES: pkg ncurses-libticw socrunc ('libticw5','libticw')
./log:DEBUG: LIBNAMES: pkgname libticw5 devname libticw
it won't find ncurses-libticw to replace it with libticw5 (because it's
already named libticw)

So can someone explain why we need that 'newpkg = pkg.replace(orig_pkg, devname, 1)' in else?

Or any hint which change caused this (as debian.bbclass wasn't changed in this aspect).

Reordering PACKAGES seems like really error prone and even not really possible with dynamic packages etc.

Here is added debug I've used to find it:

diff --git a/classes/debian.bbclass b/classes/debian.bbclass
index 1a2c7da..9239631 100644
--- a/classes/debian.bbclass
+++ b/classes/debian.bbclass
@@ -84,10 +84,13 @@ python debian_package_name_hook () {
                        else:
                                bb.note("Multiple libraries (%s) found and LEAD_SONAME not defined" % ", ".join(sonames))

+               bb.debug(1, 'LIBNAMES: pkg %s soname %s' % (orig_pkg, soname))
                if has_libs and not has_bins and soname:
                        soname_result = socrunch(soname)
+                       bb.debug(1, 'LIBNAMES: pkg %s socrunc %s' % (orig_pkg, soname_result))
                        if soname_result:
                                (pkgname, devname) = soname_result
+                               bb.debug(1, 'LIBNAMES: pkgname %s devname %s' % (pkgname, devname))
                                for pkg in packages.split():
                                        if (bb.data.getVar('PKG_' + pkg, d) or bb.data.getVar('DEBIAN_NOAUTONAME_' + pkg, d)):
                                                continue
@@ -95,11 +98,15 @@ python debian_package_name_hook () {
                                        if debian_pn:
                                                newpkg = debian_pn
                                        elif pkg == orig_pkg:
+                                               bb.debug(1, 'LIBNAMES: pkg %s == orig_pkg %s' % (pkg, orig_pkg))
                                                newpkg = pkgname
                                        else:
+                                               bb.debug(1, 'LIBNAMES: else pkg %s.replace(%s, %s)' % (pkg, orig_pkg, devname))
                                                newpkg = pkg.replace(orig_pkg, devname, 1)
+                                       bb.debug(1, 'LIBNAMES: pkgname %s devname %s pkg %s orig_pkg %s debian_pn %s newpkg %s' % (pkgname, devname, pkg, orig_pkg, debian_pn, newpkg))
                                        if newpkg != pkg:
                                                bb.data.setVar('PKG_' + pkg, newpkg, d)
+                                               bb.debug(1, 'setVar PKG_%s, %s' % (pkg, newpkg))

        for pkg in (bb.data.getVar('AUTO_LIBNAME_PKGS', d, 1) or "").split():
                auto_libname(packages, pkg)


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

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-02-17 16:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-02-17 16:33         ` Phil Blundell

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.