diff options
author | Justin Davis <jrcd83@gmail.com> | 2012-06-02 05:51:05 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2012-06-02 05:51:05 +0200 |
commit | 519d6ef44c5b1626080a4ec979f2b646709fc93e (patch) | |
tree | 9da9c3afe9c8610581dd9560c9155ca73c8dc96f /preps | |
parent | 6871e5149efe418fb8d067ad85adf9142c62392c (diff) | |
download | genpkg-519d6ef44c5b1626080a4ec979f2b646709fc93e.tar.gz genpkg-519d6ef44c5b1626080a4ec979f2b646709fc93e.tar.xz |
Fix perlcore to work properly. Mark core-only modules.
Find every module, not just the main module in the distribution.
This acted like provides.pl in perlpkgscripts. Now I remember why
I used Module::CoreList instead of going through this.
Updates the perlcore.mods-* files under misc/ as well. Fix perl-dist
to parse the extra * properly.
Diffstat (limited to 'preps')
-rwxr-xr-x | preps/perl.d/perl-dist | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/preps/perl.d/perl-dist b/preps/perl.d/perl-dist index dd1413c..fd5c216 100755 --- a/preps/perl.d/perl-dist +++ b/preps/perl.d/perl-dist @@ -13,7 +13,8 @@ if(exists $ENV{'GENPKGDBG'}){ } # Visible through entire file. -my %CoreMods = loadcore(); +my (%CoreMods, %CoreOnly); +loadcore(); package Convert; @@ -331,11 +332,7 @@ sub _distsofmods sub _nocore { - my @mods; - for my $m (@_){ - push @mods, $m unless(exists $CoreMods{$m}); - } - return @mods; + return grep { not $CoreOnly{$_} } @_; } #----------------------------------------------------------------------------- @@ -611,15 +608,13 @@ END_ERR exit 1; } - my %cm; open my $if, '<', $cmpath or die "$PROG: open $cmpath: $!"; while(<$if>){ - my($m, $v) = split; - $cm{$m} = $v; + my($m, $v, $coreonly) = split; + $CoreMods{$m} = $v; + $CoreOnly{$m} = 1 if($coreonly); } close $if; - return %cm; - } exit main(@ARGV); |