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

Reply via email to