From patchwork Fri Oct 4 00:22:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 175198 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1057887ill; Thu, 3 Oct 2019 17:22:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCfEppS6QFCiIOsxGg11JeVpqsDD7npzFUtyE+ZsnOHVYgdLzalKoCDUvYfVAj/Ggy+yV7 X-Received: by 2002:a17:90a:e008:: with SMTP id u8mr13902266pjy.46.1570148578372; Thu, 03 Oct 2019 17:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570148578; cv=none; d=google.com; s=arc-20160816; b=ACIPkVSRyOlVwQOIhYaJXVyulslNoYkSkrmZcOblvumwNyHUy3h+RuEMKWWOhFUVl0 KJxObf0UeDQDuLutJjFhBEPmxd/SwFsp4xOm5+IoDFnvOQO7pn2E78UVeTqLvid7cSy0 y9v3u062V7m5bChggc/O8I1yGckSh6utJibFXzi8btCD/RH/44I8wG7bT7UfBf2opPhI 27il+SrHESkQ3Jrbt/OAe94IrcHOABH4mLwFEUx7uFdYPFyV1gV1dH7Xt+a6G/1Etafi Z9Q/8pabDC6lz5Mnb8qkMlD3E8uZEJRmYIYFMAs8Msa2f5QEE8cUiIZ+5nSn6oVEGbEs Vkmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=HE85VV9BjM2vnnK/DVc6Zfxfebjj2ftPZCWozFOu1l8=; b=0bw7hl6TuB08TYUVILyY88Ed9ETXl4qU2GKPB+Do/2g7esf4sDNRAUZZYP595o8eTS r3tbvDr6zh1rk9Fv4p9FBzc6xEE/TzcmIM97ZWPNwM7gtdRW+iY+z7A21MA3En5OoW2k sEjIvbZ6UArnKFDcsAEfful/z887CB9lxValME1jfI0V445cvdwuDGXscQy3YwbyOY22 USgBu2k5UuRzohij/MW0PhEgzKy8WEeTqiNWToeRbpn4ofJaRd/jsRX1S2yyoQWKe6Up 7e793vJXXLPNaTcU+p9O38hxV+m6a21chAU2tfb0Nq+mgRBIxpXX1PtgR30hCJzXHyDQ VJkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Rn1TIU9M; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id x20si4538944pfa.273.2019.10.03.17.22.58; Thu, 03 Oct 2019 17:22:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=Rn1TIU9M; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 5B2E37F180; Fri, 4 Oct 2019 00:22:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mail.openembedded.org (Postfix) with ESMTP id B53CA7F102 for ; Fri, 4 Oct 2019 00:22:18 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id 5so3862264wmg.0 for ; Thu, 03 Oct 2019 17:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=A4E0pn7vVhomKJF0z92EoKb/Fz2ZIL/QRHEo0vA9QNU=; b=Rn1TIU9M2v6dDPZ/bOD+T18+YJYhMzvnTqGHDIRKFk/thpgXP6/5F/2Hcf+56EW3/f /56IMXlSlVvfe46JDYUM++eMb6lGVecWKtxx8dwm4wIbNcTb5MvbIrLJd9oozKR89GAk bqTERtBiYpbByiF+DttcXsQVyvkVH0wo8KcBazXdI0s8gau6dz1Xelbg4xFjZAoBe/Gm l6V/QGDoWpxX1ZkkYrFuirP6YXkb9H5l0xFTIkt1sxiukIVBiU6XGbvC0bhd2wAuq6b5 2/V9AG5Z8I5+8p0MuSZNtFKHdEcNZJqw5VBMnSIqTrzlOM/A8nbYsWZgNuyuttxBGr+/ cigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=A4E0pn7vVhomKJF0z92EoKb/Fz2ZIL/QRHEo0vA9QNU=; b=emqqDQiZEq5IGbxFZF8mxiTXjRqcaLH4mCx0zqg6nQN1Xv9RzX9bYg1TN3stfhSvdL foG2ihWfSY9XYGn/rMmwKTKjAxh+NwKxuLwc7M6wfSaB8F+rFoyS3epIVdrwUS0leQ7C aS2TqUyOQO7+4r3tKyTwR8Gmrmm1ClMz5UFyQk691J37saQe5r4JWJ8f3FPQeq8dckiY pGCmKCn3j3n7ZI78fbtWF6njXp4kuFLhn2YUraLopYjTmBXEe2LP2GiIM+irW65z/iwL MU6PYj0zx6fkHi3sLdNLcfN22nx3NSta14VbwnMR1OPxJTaoHS8uzQ7+9W+7WmY/GIpk j0mA== X-Gm-Message-State: APjAAAVvoaX8WIm0VqTMXF9WSHfcSKrhyy1+4PlfKdam92EsxmGTY68z Uiy6A50AeKokPR1GtM1mDxAtlieVuto= X-Received: by 2002:a1c:3cc3:: with SMTP id j186mr8223354wma.119.1570148539064; Thu, 03 Oct 2019 17:22:19 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id c6sm4604375wrm.71.2019.10.03.17.22.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2019 17:22:18 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 4 Oct 2019 01:22:17 +0100 Message-Id: <20191004002217.2159-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH] insane: add check for perllocal.pod X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org perlocal.pod is an index file of locally installed modules and so shouldn't be installed by any distribution packages. cpan.bbclass already sets NO_PERLOCAL to stop this file being generated by most Perl recipes, but if a recipe is using MakeMaker directly (such as rrdtool) then they might not be doing this correctly. To avoid multiple packages shipping this file and then failing to install together, add a QA test to check if this file exists and by default emit an error if it does. [ YOCTO #13491 ] Signed-off-by: Ross Burton --- meta/classes/insane.bbclass | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 9b886d13805..9605ac2baee 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -34,7 +34,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ split-strip packages-list pkgv-undefined var-undefined \ version-going-backwards expanded-d invalid-chars \ license-checksum dev-elf file-rdeps configure-unsafe \ - configure-gettext \ + configure-gettext perllocalpod \ " # Add usrmerge QA check based on distro feature ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" @@ -795,6 +795,23 @@ def package_qa_check_usrmerge(pkg, d, messages): return False return True +QAPKGTEST[perllocalpod] = "package_qa_check_perllocalpod" +def package_qa_check_perllocalpod(pkg, d, messages): + """ + Check that the recipe didn't ship a perlocal.pod file, which shouldn't be + installed in a distribution package. cpan.bbclass sets NO_PERLLOCAL=1 to + handle this for most recipes. + """ + import glob + pkgd = oe.path.join(d.getVar('PKGDEST'), pkg) + podpath = oe.path.join(pkgd, d.getVar("libdir"), "perl*", "*", "*", "perllocal.pod") + + matches = glob.glob(podpath) + if matches: + matches = [package_qa_clean_path(path, d, pkg) for path in matches] + msg = "%s contains perllocal.pod (%s), should not be installed" % (pkg, " ".join(matches)) + package_qa_add_message(messages, "perllocalpod", msg) + QAPKGTEST[expanded-d] = "package_qa_check_expanded_d" def package_qa_check_expanded_d(package, d, messages): """