Summary: | perl-module.eclass: Add perl_rm_files utility | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kent Fredric (IRC: kent\n) (RETIRED) <kentnl> |
Component: | [OLD] Development | Assignee: | Gentoo Perl team <perl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 239510 | ||
Attachments: |
perl-module.eclass patch
perl-module.eclass patch |
Created attachment 383948 [details, diff]
perl-module.eclass patch
Revised eclass patch after extensive testing on perl-experimental overlay.
Most significant is the addition of the bash array PERL_RM_FILES that is automatically detected in perl-module_src_prep and applied in the same way as the PATCHES variable does.
This proved much more useful and far less prone to slipups than manually redefinining src_prepare() in all the relevant places.
After talking to dilfridge on IRC, we've decided to erase the package without masking it. Indeed, we're only removing a version of the package and not the entire Portage tree directory so it is fine to do so. Here's the last ChangeLog entry, as far as perl-core/Test-Simple is concerned: $ pwd /home/patrice/gentoo-x86/perl-core/Test-Simple $ head -6 ChangeLog # ChangeLog for perl-core/Test-Simple # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/perl-core/Test-Simple/ChangeLog,v 1.99 2014/10/28 23:26:11 monsieurp Exp $ 28 Oct 2014; Patrice Clement <monsieurp@gentoo.org> -Test-Simple-0.980.5-r1.ebuild: Removing this package. See bug 520756. Thanks Kent! For my last comment. This was for another bug. Holy fuck, I should rest instead of fixing bugs at 1 am. :( Checked in Kent's diff. revision 1.145 date: 2014-11-01 23:08:54 +0100; author: monsieurp; state: Exp; lines: +41 -1; commitid: 3063545559f44567; Introducing perl_rm_files() function. See #520756. |
Created attachment 383512 [details, diff] perl-module.eclass patch Attached is a small function suggested for use in perl-module.eclass. It doesn't do very much, but makes this sort of task easier. Namely: - perl modules are standard enough we don't have to dick around with ${S} on every path. - gives basic reporting of removing files. - removes relevant MANIFEST lines to avoid warnings about "Files missing from your kit", which perl users are accustomed to treating as bugs. As I said, it doesn't do much, but it reduces about 3 lines of boiler plate into one function call, and makes things nicer overall. I've probably done something horrible wrt/ POSIX compliance though with MANIFEST augmentation. sed is horrible and I could not find a sensible way to implement "delete a line from a file matching an exact string" in it. Automated escaping entirely failed because for some reason: echo 'Hello world' | sed -e 's|\x5E|yourmom|' Is entirely backwards, and \x5E is interpreted as a literal regex for the start of the line. And the horribleness of that quickly got out of control where fgrep may just do the trick.