summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Fredric <kentfredric@gmail.com>2012-02-12 15:05:10 +1300
committerKent Fredric <kentfredric@gmail.com>2012-02-12 15:05:10 +1300
commitb6c34a07e3e80260db3571c14015f3c7e53e137a (patch)
treecd61a681bdc499f48b7da52be21e8b9353772511
parent[newversion] Catalyst-Authentication-Store-DBIx-Class-0.150.300 (diff)
downloadperl-overlay-b6c34a07e3e80260db3571c14015f3c7e53e137a.tar.gz
perl-overlay-b6c34a07e3e80260db3571c14015f3c7e53e137a.tar.bz2
perl-overlay-b6c34a07e3e80260db3571c14015f3c7e53e137a.zip
[scripts] gen_ebuild more verbose error handling
-rwxr-xr-xscripts/gen_ebuild.pl33
1 files changed, 28 insertions, 5 deletions
diff --git a/scripts/gen_ebuild.pl b/scripts/gen_ebuild.pl
index 87d91d7e0..e8635b62a 100755
--- a/scripts/gen_ebuild.pl
+++ b/scripts/gen_ebuild.pl
@@ -10,6 +10,7 @@ use FindBin;
use lib "$FindBin::Bin/lib";
use env::gentoo::perl_experimental;
use utf8;
+use Data::Dump qw( pp );
my $env = env::gentoo::perl_experimental->new();
my $flags;
@@ -145,20 +146,32 @@ else {
$fh->say('IUSE=""');
}
+pp($handler2);
+
if ( $handler2->has_cdeps ) {
$fh->say('perl_meta_configure() {');
for my $dep ( @{ $handler2->cdeps } ) {
$fh->say( "\t# " . $dep->{dep} );
- $fh->say( "\techo " . $dep->{install} );
+ if ( not defined $dep->{install} ) {
+ $fh->say( "\t#echo unresolved");
+ warn "cdep " . $dep->{dep} . " was not resolved to a dependency";
+ } else {
+ $fh->say( "\techo " . $dep->{install} );
+ }
}
$fh->say('}');
push @{$depends}, '$(perl_meta_configure)';
}
if ( $handler2->has_bdeps ) {
$fh->say('perl_meta_build() {');
- for my $dep ( @{ $handler2->bdeps } ) {
+ for my $dep ( @{ $handler2->bdeps } ) {
$fh->say( "\t# " . $dep->{dep} );
- $fh->say( "\techo " . $dep->{install} );
+ if ( not defined $dep->{install} ) {
+ $fh->say( "\t#echo unresolved");
+ warn "bdep " . $dep->{dep} . " was not resolved to a dependency";
+ } else {
+ $fh->say( "\techo " . $dep->{install} );
+ }
}
$fh->say('}');
push @{$depends}, '$(perl_meta_build)';
@@ -168,7 +181,12 @@ if ( $handler2->has_rdeps ) {
$fh->say('perl_meta_runtime() {');
for my $dep ( @{ $handler2->rdeps } ) {
$fh->say( "\t# " . $dep->{dep} );
- $fh->say( "\techo " . $dep->{install} );
+ if ( not defined $dep->{install} ) {
+ $fh->say( "\t#echo unresolved");
+ warn "rdep: " . $dep->{dep} . " was not resolved to a dependency";
+ } else {
+ $fh->say( "\techo " . $dep->{install} );
+ }
}
$fh->say('}');
push @{$depends}, '$(perl_meta_runtime)';
@@ -179,7 +197,12 @@ if ( $handler2->has_tdeps ) {
$fh->say('perl_meta_test() {');
for my $dep ( @{ $handler2->tdeps } ) {
$fh->say( "\t# " . $dep->{dep} );
- $fh->say( "\techo " . $dep->{install} );
+ if ( not defined $dep->{install} ) {
+ $fh->say( "\t#echo unresolved");
+ warn "tdep: " . $dep->{dep} . " was not resolved to a dependency";
+ } else {
+ $fh->say( "\techo " . $dep->{install} );
+ }
}
$fh->say('}');
push @{$depends}, 'test? ( $(perl_meta_test) )';