From: Vincent Pit Date: Fri, 12 Dec 2008 21:04:02 +0000 (+0100) Subject: Rename the stat 'dist' slot in 'distribution', as 'dist' seems to be used by CPANPLUS X-Git-Tag: v0.05~19 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=667d0c86a602a24e6c948443557ebfb9700c83fa;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Rename the stat 'dist' slot in 'distribution', as 'dist' seems to be used by CPANPLUS --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 8975624..24e1e35 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -70,8 +70,8 @@ sub init { my $stat = $self->status; my $conf = $self->parent->parent->configure_object; - $stat->mk_accessors(qw/name version author dist desc uri src license deps - eb_name eb_version eb_dir eb_file fetched_arch + $stat->mk_accessors(qw/name version author distribution desc uri src license + deps eb_name eb_version eb_dir eb_file fetched_arch overlay distdir keywords do_manifest header footer force verbose/); @@ -155,7 +155,7 @@ sub prepare { my $author = $mod->author->cpanid; $stat->author($author); - $stat->dist($name . '-' . $version); + $stat->distribution($name . '-' . $version); $version =~ s/[^\d._]+//g; $version =~ s/^[._]*//; @@ -184,7 +184,7 @@ sub prepare { error "Can't force rewriting of $file -- skipping"; } } else { - msg 'Ebuild already generated for ' . $stat->dist . ' -- skipping'; + msg 'Ebuild already generated for ' . $stat->distribution . ' -- skipping'; } if ($skip) { $stat->prepared(1); @@ -244,13 +244,13 @@ sub create { my $stat = $self->status; unless ($stat->prepared) { - error 'Can\'t create ' . $stat->dist . ' since it was never prepared -- aborting'; + error 'Can\'t create ' . $stat->distribution . ' since it was never prepared -- aborting'; $stat->created(0); return 0; } if ($stat->created) { - msg $stat->dist . ' was already created -- skipping'; + msg $stat->distribution . ' was already created -- skipping'; return 1; } @@ -270,7 +270,7 @@ sub create { my $d = $stat->header; $d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n"; $d .= 'MODULE_AUTHOR="' . $stat->author . "\"\ninherit perl-module\n\n"; - $d .= 'S="${WORKDIR}/' . $stat->dist . "\"\n"; + $d .= 'S="${WORKDIR}/' . $stat->distribution . "\"\n"; $d .= 'DESCRIPTION="' . $stat->desc . "\"\n"; $d .= 'HOMEPAGE="' . $stat->uri . "\"\n"; $d .= 'SRC_URI="' . $stat->src . "\"\n"; @@ -310,7 +310,7 @@ sub create { return 0; } - msg 'Adding Manifest entry for ' . $stat->dist; + msg 'Adding Manifest entry for ' . $stat->distribution; unless ($self->_run([ 'ebuild', $file, 'manifest' ], 0)) { 1 while unlink $file; return 0;