[OE-core] [PATCH] eglibc-locale: fix localedef packaging

Phil Blundell pb at pbcl.net
Thu Jun 30 11:17:22 UTC 2011


On Wed, 2011-06-29 at 14:49 +0100, Richard Purdie wrote:
> On Wed, 2011-06-29 at 14:36 +0100, Phil Blundell wrote:
> > On Tue, 2011-06-28 at 22:32 +0200, Koen Kooi wrote:
> > > From http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/testlab/commit/?h=yocto&id=0d0e14cda2ddd881d09798b0e6edd8086aa9b6d9
> > > 
> > > +libc6 -> libc6_dev;
> > > 
> > > So libc6 now depends on libc6-dev :(
> > 
> > I guess it would be straightforward to patch insane.bbclass to detect
> > that particular failure (which does indeed seem to happen to libc
> > distressingly often).  It already diagnoses the case where a package
> > erroneously depends on a -dbg package, and I can't think of any reason
> > why the same logic couldn't be applied to -dev.
> 
> I'd love to see a patch for this! :)

Your wish, naturally, is my command.  I've built micro-base-image with
this and verified that I didn't get any false positives; I also checked
(via some manual fiddling) that it did indeed detect the case that we
want it to.  

I guess it might be a good idea for someone to test it with a slightly
larger dataset before actually checking it in, just in case.

p.

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 35809b9..f7e5524 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -103,6 +103,7 @@ def package_qa_get_machine_dict():
 # 8 - .la contains reference to the workdir
 # 9 - LDFLAGS ignored
 # 10 - Build paths in binaries
+# 11 - package depends on devel package
 
 def package_qa_clean_path(path,d):
     """ Remove the common prefix from the path. In this case it is the TMPDIR"""
@@ -134,6 +135,7 @@ def package_qa_write_error(error_class, name, path, d):
         ".la contains reference to the workdir",
         "LDFLAGS ignored",
         "package contains reference to tmpdir paths",
+	"package depends on devel package",
     ]
 
     log_path = os.path.join( bb.data.getVar('T', d, True), "log.qa_package" )
@@ -493,12 +495,14 @@ def package_qa_check_rdepends(pkg, pkgdest, d):
         # Now check the RDEPENDS
         rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "")
 
-
         # Now do the sanity check!!!
         for rdepend in rdepends:
             if "-dbg" in rdepend:
                 error_msg = "%s rdepends on %s" % (pkgname,rdepend)
                 sane = package_qa_handle_error(2, error_msg, pkgname, rdepend, d)
+	    if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev"):
+	        error_msg = "%s rdepends on %s" % (pkgname, rdepend)
+                sane = package_qa_handle_error(11, error_msg, pkgname, rdepend, d)
 
     return sane
 






More information about the Openembedded-core mailing list