Patchwork [1/1] insane.bbclass: Added QA warning for shipping /usr/share/info/dir

login
register
mail settings
Submitter Mihai Prica
Date July 1, 2013, 10:31 a.m.
Message ID <2ee8976b4ad482eafb186deba9a14fc52f6dc8cf.1372674367.git.mihai.prica@intel.com>
Download mbox | patch
Permalink /patch/52725/
State Accepted
Commit 64745c27d206931b6b50399db505cd45a11da6cb
Headers show

Comments

Mihai Prica - July 1, 2013, 10:31 a.m.
/usr/share/info/dir should be generated at install time in a postinst.
Added QA warning to check at build time for this file. The warning
is disabled by default.

[YOCTO #3969]

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
---
 meta/classes/insane.bbclass |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
Ross Burton - July 1, 2013, 2:51 p.m.
On 1 July 2013 11:31, Mihai Prica <mihai.prica@intel.com> wrote:
> /usr/share/info/dir should be generated at install time in a postinst.
> Added QA warning to check at build time for this file. The warning
> is disabled by default.

Patch is good but why don't we enable this by default?

Ross
Martin Jansa - July 10, 2013, 11:44 a.m.
On Mon, Jul 01, 2013 at 03:51:26PM +0100, Burton, Ross wrote:
> On 1 July 2013 11:31, Mihai Prica <mihai.prica@intel.com> wrote:
> > /usr/share/info/dir should be generated at install time in a postinst.
> > Added QA warning to check at build time for this file. The warning
> > is disabled by default.
> 
> Patch is good but why don't we enable this by default?

FWIW: this is list of QA issues found with this check in my world builds:

gcc-4.8.1: The /usr/share/info/dir file is not meant to be shipped in a particular package.
ed-1.7: The /usr/share/info/dir file is not meant to be shipped in a particular package.
emacs-23.4: The /usr/share/info/dir file is not meant to be shipped in a particular package.
quagga-0.99.21: The /usr/share/info/dir file is not meant to be shipped in a particular package.
lzip-1.14: The /usr/share/info/dir file is not meant to be shipped in a particular package.
Mihai Prica - July 11, 2013, 7:15 a.m.
Hi Ross,

> -----Original Message-----
> 
> On Mon, Jul 01, 2013 at 03:51:26PM +0100, Burton, Ross wrote:
> > On 1 July 2013 11:31, Mihai Prica <mihai.prica@intel.com> wrote:
> > > /usr/share/info/dir should be generated at install time in a postinst.
> > > Added QA warning to check at build time for this file. The warning
> > > is disabled by default.
> >
> > Patch is good but why don't we enable this by default?

Sorry for the responding so late but I've missed this mail. I've looked at
master and Paul already enabled this check.

Thanks,
Mihai

> 
> FWIW: this is list of QA issues found with this check in my world builds:
> 
> gcc-4.8.1: The /usr/share/info/dir file is not meant to be shipped in a particular
> package.
> ed-1.7: The /usr/share/info/dir file is not meant to be shipped in a particular
> package.
> emacs-23.4: The /usr/share/info/dir file is not meant to be shipped in a particular
> package.
> quagga-0.99.21: The /usr/share/info/dir file is not meant to be shipped in a
> particular package.
> lzip-1.14: The /usr/share/info/dir file is not meant to be shipped in a particular
> package.
> 
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 27c225f..cde1ea9 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -32,7 +32,7 @@  QA_SANE = "True"
 WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
             textrel already-stripped incompatible-license files-invalid \
             installed-vs-shipped compile-host-path install-host-path \
-            pn-overrides \
+            pn-overrides infodir \
             "
 ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
             perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -552,6 +552,16 @@  def package_qa_check_xorg_driver_abi(path, name, d, elf, messages):
                 return
         messages.append("Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path)))
 
+QAPATHTEST[infodir] = "package_qa_check_infodir"
+def package_qa_check_infodir(path, name, d, elf, messages):
+    """
+    Check that /usr/share/info/dir isn't shipped in a particular package
+    """
+    infodir = d.expand("${infodir}/dir")
+
+    if infodir in path:
+        messages.append("The /usr/share/info/dir file is not meant to be shipped in a particular package.")
+
 def package_qa_check_license(workdir, d):
     """
     Check for changes in the license files