From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-727826-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 2103C13877A
	for <garchives@archives.gentoo.org>; Sun, 24 Aug 2014 13:56:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0D173E0833;
	Sun, 24 Aug 2014 13:56:27 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 872C7E0844
	for <gentoo-commits@lists.gentoo.org>; Sun, 24 Aug 2014 13:56:26 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 37C6A33FD1B
	for <gentoo-commits@lists.gentoo.org>; Sun, 24 Aug 2014 13:56:25 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 735AB3CB2
	for <gentoo-commits@lists.gentoo.org>; Sun, 24 Aug 2014 13:56:23 +0000 (UTC)
From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" <kentfredric@gmail.com>
Message-ID: <1408883354.2b3eb8fa5687ff501687e12d1c133eccc6e3670e.kent@gentoo>
Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/
X-VCS-Repository: proj/perl-overlay
X-VCS-Files: eclass/perl-module.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: kent
X-VCS-Committer-Name: Kent Fredric
X-VCS-Revision: 2b3eb8fa5687ff501687e12d1c133eccc6e3670e
X-VCS-Branch: master
Date: Sun, 24 Aug 2014 13:56:23 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 83884ee1-3924-437c-bd2a-0c41c8a3ffbb
X-Archives-Hash: a970883fb9a239bfa66dffed8ab9271c

commit:     2b3eb8fa5687ff501687e12d1c133eccc6e3670e
Author:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun Aug 24 12:29:14 2014 +0000
Commit:     Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sun Aug 24 12:29:14 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=2b3eb8fa

add perl_rm_files function to perl-module.eclass ( bug #520756 )

---
 eclass/perl-module.eclass | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index b1d4c2e..6f7b5f4 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -426,6 +426,36 @@ perl_remove_temppath() {
 	done
 }
 
+# @FUNCTION: perl_rm_files
+# @USAGE: perl_rm_files "file_1" "file_2"
+# @DESCRIPTION:
+# Remove certain files from a Perl release and remove them from the MANIFEST
+# while we're there.
+#
+# Most useful in src_prepare for nuking bad tests, and is highly recommended
+# for any tests like 'pod.t', 'pod-coverage.t' or 'kwalitee.t', as what they
+# test is completely irrelevant to end users, and frequently fail simply
+# because the authors of Test::Pod... changed their recommendations, and thus
+# failures are only useful feedback to Authors, not users.
+#
+# Removing from MANIFEST also avoids needless log messages warning
+# users about files "missing from their kit".
+perl_rm_files() {
+	debug-print-function $FUNCNAME "$@"
+	local skipfile=${S}/.gentoo_makefile_skip
+	local manifile=${S}/MANIFEST
+	local manitemp=${S}/.gentoo_manifest_temp
+	for filename in "$@"; do
+		einfo "Removing un-needed ${filename}";
+		# Remove the file
+		rm ${S}/$filename
+		echo ${filename} >> ${skipfile}
+	done
+	grep -v -F -f $skipfile $manifile > $manitemp
+	mv $manitemp $manifile
+	rm $skipfile;
+}
+
 perl_link_duallife_scripts() {
 	debug-print-function $FUNCNAME "$@"
 	if [[ ${CATEGORY} != perl-core ]] || ! has_version ">=dev-lang/perl-5.8.8-r8" ; then