[Bps-public-commit] r18381 - in Shipwright/trunk: lib/Shipwright/Backend lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Feb 13 20:44:48 EST 2009
Author: sunnavy
Date: Fri Feb 13 20:44:47 2009
New Revision: 18381
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Backend/Base.pm
Shipwright/trunk/lib/Shipwright/Script/Import.pm
Log:
r19835 at sunnavys-mb: sunnavy | 2009-02-14 09:43:29 +0800
comment out fiddle_order, it is bloddy and even not right
Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm Fri Feb 13 20:44:47 2009
@@ -322,7 +322,7 @@
or confess $@;
my $order = $dep->schedule_all();
- $order = $self->fiddle_order($order);
+# $order = $self->fiddle_order($order);
$self->order($order);
}
@@ -340,51 +340,53 @@
note, this sub won't update shipwright/order.yml, you need to do it yourself.
-=cut
-
-sub fiddle_order {
- my $self = shift;
- my $orig_order = shift;
-
- my $order;
- if ($orig_order) {
-
- # don't change the argument
- $order = [@$orig_order];
- }
- else {
- $order = $self->order;
- }
+NOTE: this's going to be dropped, it's _wrong_ to fiddle order
- for my $maker ( 'cpan-Module-Build', 'cpan-ExtUtils-MakeMaker' ) {
- if ( grep { $_ eq $maker } @$order ) {
- @$order = grep { $_ ne $maker } @$order;
- my $first_cpan_index = firstidx { /^cpan-/ } @$order;
- $first_cpan_index = scalar @$order if $first_cpan_index == -1;
- splice @$order, $first_cpan_index, 0, $maker;
-
- if ( $maker eq 'cpan-Module-Build' ) {
-
- my @maker_recommends;
-
- # cpan-Regexp-Common is the dep of cpan-Pod-Readme
- for my $r (
- 'cpan-Regexp-Common', 'cpan-Pod-Readme',
- 'cpan-version', 'cpan-ExtUtils-CBuilder',
- 'cpan-Archive-Tar', 'cpan-ExtUtils-ParseXS',
- )
- {
- push @maker_recommends, $r if grep { $r eq $_ } @$order;
- }
+=cut
- my %maker_recommends = map { $_ => 1 } @maker_recommends;
- @$order = grep { $maker_recommends{$_} ? 0 : 1 } @$order;
- splice @$order, $first_cpan_index + 1, 0, @maker_recommends;
- }
- }
- }
- return $order;
-}
+#sub fiddle_order {
+# my $self = shift;
+# my $orig_order = shift;
+#
+# my $order;
+# if ($orig_order) {
+#
+# # don't change the argument
+# $order = [@$orig_order];
+# }
+# else {
+# $order = $self->order;
+# }
+#
+# for my $maker ( 'cpan-Module-Build', 'cpan-ExtUtils-MakeMaker' ) {
+# if ( grep { $_ eq $maker } @$order ) {
+# @$order = grep { $_ ne $maker } @$order;
+# my $first_cpan_index = firstidx { /^cpan-/ } @$order;
+# $first_cpan_index = scalar @$order if $first_cpan_index == -1;
+# splice @$order, $first_cpan_index, 0, $maker;
+#
+# if ( $maker eq 'cpan-Module-Build' ) {
+#
+# my @maker_recommends;
+#
+# # cpan-Regexp-Common is the dep of cpan-Pod-Readme
+# for my $r (
+# 'cpan-Regexp-Common', 'cpan-Pod-Readme',
+# 'cpan-version', 'cpan-ExtUtils-CBuilder',
+# 'cpan-Archive-Tar', 'cpan-ExtUtils-ParseXS',
+# )
+# {
+# push @maker_recommends, $r if grep { $r eq $_ } @$order;
+# }
+#
+# my %maker_recommends = map { $_ => 1 } @maker_recommends;
+# @$order = grep { $maker_recommends{$_} ? 0 : 1 } @$order;
+# splice @$order, $first_cpan_index + 1, 0, @maker_recommends;
+# }
+# }
+# }
+# return $order;
+#}
sub _fill_deps {
my $self = shift;
Modified: Shipwright/trunk/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Import.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Script/Import.pm Fri Feb 13 20:44:47 2009
@@ -226,8 +226,8 @@
);
}
- my $new_order = $shipwright->backend->fiddle_order;
- $shipwright->backend->order($new_order);
+# my $new_order = $shipwright->backend->fiddle_order;
+# $shipwright->backend->order($new_order);
}
print "imported with success\n";
More information about the Bps-public-commit
mailing list