aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.pm8
-rw-r--r--URPM/Build.pm6
2 files changed, 5 insertions, 9 deletions
diff --git a/URPM.pm b/URPM.pm
index 1b89e23..c5bdc88 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -75,14 +75,14 @@ sub search {
return $best;
}
-# Olivier Thauvin:
-# Return @$listid, $start .. $end or the whole deplist id
-# according given args
+#- Olivier Thauvin:
+#- Returns @$listid, $start .. $end or the whole deplist id
+#- according to the given args
sub build_listid {
my ($urpm, $start, $end, $listid) = @_;
@{$listid || []} > 0 ? @{$listid} :
- ((defined($start) ? $start : 0) .. (defined($end) ? $end : $#{$urpm->{depslist}}));
+ (($start || 0) .. (defined($end) ? $end : $#{$urpm->{depslist}}));
}
sub traverse {
diff --git a/URPM/Build.pm b/URPM/Build.pm
index 40eb49a..3d48c1d 100644
--- a/URPM/Build.pm
+++ b/URPM/Build.pm
@@ -408,9 +408,7 @@ sub build_hdlist {
$dir = $options{dir} || _get_tmp_dir;
-d $dir or die "no directory $dir\n";
- @idlist = @{$options{idlist} || []} > 0 ? @{$options{idlist}} :
- (($options{start} || 0) .. ($options{end} || $#{$urpm->{depslist}}));
- @idlist or return;
+ @idlist = $urpm->build_listid($options{start}, $options{end}, $options{idlist}) or return;
#- compression ratio are not very high, sample for cooker
#- gives the following (main only and cache fed up):
@@ -485,8 +483,6 @@ sub build_synthesis {
sub build_base_files {
my ($urpm, %options) = @_;
- my @idlist = $urpm->build_listid($options{start}, $options{end}, $options{idlist}) or return;
-
if ($options{depslist}) {
open my $fh, ">$options{depslist}";
foreach (0 .. $#{$urpm->{depslist}}) {