Return-Path: 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-Google-Smtp-Source: APXvYqym+T0DGZvqL9lTKfqdvbWumEQ3chy/D8vAAunM8KNmw6H1VY2FMinTAsM6APYERulgT6+c9A== 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: [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: , X-List-Received-Date: Fri, 04 Oct 2019 00:22:19 -0000 Content-Transfer-Encoding: 8bit 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(-) 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): """ -- 2.20.1