aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Build.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-01-23 14:29:31 +0000
committerFrancois Pons <fpons@mandriva.com>2003-01-23 14:29:31 +0000
commit16d9930415ab46e0b9101962ffce66f44f5fd794 (patch)
tree6a36e1743576fe4e8e20a6b5693d7c3f6e44f53d /URPM/Build.pm
parent8a90fb13057dde4edaea7c368ed30bf58e282cd4 (diff)
downloadperl-URPM-16d9930415ab46e0b9101962ffce66f44f5fd794.tar
perl-URPM-16d9930415ab46e0b9101962ffce66f44f5fd794.tar.gz
perl-URPM-16d9930415ab46e0b9101962ffce66f44f5fd794.tar.bz2
perl-URPM-16d9930415ab46e0b9101962ffce66f44f5fd794.tar.xz
perl-URPM-16d9930415ab46e0b9101962ffce66f44f5fd794.zip
0.81-7mdk
Diffstat (limited to 'URPM/Build.pm')
-rw-r--r--URPM/Build.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/URPM/Build.pm b/URPM/Build.pm
index 6119381..f1116e2 100644
--- a/URPM/Build.pm
+++ b/URPM/Build.pm
@@ -114,6 +114,11 @@ sub parse_headers {
#- callback : callback to relocate reference to package id.
sub compute_deps {
my ($urpm, %options) = @_;
+ my %propagated_weight = ( basesystem => 10000,
+ msec => 20000,
+ filesystem => 50000,
+ );
+ my ($locales_weight, $step_weight, $fixed_weight) = (-5000, 10000, $propagated_weight{basesystem});
#- avoid recomputing already present infos, take care not to modify
#- existing entries, as the array here is used instead of values of infos.
@@ -187,24 +192,24 @@ sub compute_deps {
}
my $pkg = $urpm->{depslist}[$_];
- my $delta = 1 + ($pkg->name eq 'basesystem' ? 10000 : 0) + ($pkg->name eq 'msec' ? 20000 : 0);
+ my $delta = 1 + $propagated_weight{$pkg->name};
foreach (keys %requires) {
$ordered{$_} += $delta;
}
}
#- some package should be sorted at the beginning.
- my $fixed_weight = 10000;
- foreach (qw(basesystem msec * locales filesystem setup glibc sash bash libtermcap2 termcap readline ldconfig)) {
+ foreach (qw(basesystem msec rpm locales filesystem setup glibc sash bash libtermcap2 termcap readline ldconfig)) {
foreach (keys %{$urpm->{provides}{$_} || {}}) {
/^\d+$/ and $ordered{$_} = $fixed_weight;
}
- $fixed_weight += 10000;
+ /locales/ and $locales_weight += $fixed_weight;
+ $fixed_weight += $step_weight;
}
foreach ($start .. $end) {
my $pkg = $urpm->{depslist}[$_];
- $pkg->name =~ /locales-[a-zA-Z]/ and $ordered{$_} = 35000;
+ $pkg->name =~ /locales-[a-zA-Z]/ and $ordered{$_} = $locales_weight;
}
#- compute base flag, consists of packages which are required without