128 |
$archs = (); |
$archs = (); |
129 |
|
|
130 |
foreach my $pkg ( @pkgs ) { |
foreach my $pkg ( @pkgs ) { |
131 |
next if $pkg->{done} || $pkg->{obsolete} || $pkg->{rpm}->is_source_package || ! $repos->{$pkg->{repo}} || rprop($pkg, 'stage'); |
next if $pkg->{done} || $pkg->{obsolete} || $pkg->{rpm}->is_source_package || ! $repos->{$pkg->{repo}}; |
132 |
printline('bold black', 1, ' - ', $pkg->{rpm}->filename) if $opts{d}; |
printline('bold black', 1, ' - ', $pkg->{rpm}->filename) if $opts{d}; |
133 |
my $orig = 0; |
my $orig = 0; |
134 |
|
|
135 |
# Find names of packages in same or higher repos |
# Find names of packages in same or higher repos |
136 |
my %names = names($pkg, @pkgs); |
my %names = names($pkg, @pkgs); |
137 |
|
|
138 |
|
# Stage packages should never be most current |
139 |
|
if ( rprop($pkg, 'stage') ) { |
140 |
|
tagpkg($pkg, 'obsolete'); |
141 |
|
next; |
142 |
|
} |
143 |
|
|
144 |
# Move packages from base/builds to correct area |
# Move packages from base/builds to correct area |
145 |
if ( rprop($pkg, 'base') || rprop($pkg, 'builds') ) { |
elsif ( rprop($pkg, 'base') || rprop($pkg, 'builds') ) { |
146 |
printline('dark blue', 1, ' - checking base/builds') if $opts{d}; |
printline('dark blue', 1, ' - checking base/builds') if $opts{d}; |
147 |
my $repo = $names{$pkg->{name}} && $names{$pkg->{name}} > 1 ? $devel2 : $devel1; |
my $repo = $names{$pkg->{name}} && $names{$pkg->{name}} > 1 ? $devel2 : $devel1; |
148 |
if ( $pkg->{nonbase} ) { |
if ( $pkg->{nonbase} ) { |
299 |
printline('white', 0, "Finished copying/moving.\n"); |
printline('white', 0, "Finished copying/moving.\n"); |
300 |
|
|
301 |
foreach my $repo ( sort keys %repochg ) { |
foreach my $repo ( sort keys %repochg ) { |
302 |
next if ! $repos->{$repo} || $repos->{$repo}->{base} || $repos->{$repo}->{builds}; |
next if ! $repos->{$repo} || $repos->{$repo}->{base} || $repos->{$repo}->{builds} || $repos->{$repo}->{stage}; |
303 |
foreach my $arch ( @archs ) { |
foreach my $arch ( @archs ) { |
304 |
my $dir = $distrepo->{$rel}->{repo} . "$repo/$arch"; |
my $dir = $distrepo->{$rel}->{repo} . "$repo/$arch"; |
305 |
$dir = qx(readlink -f $dir); |
$dir = qx(readlink -f $dir); |
342 |
my ($pkg, @repos) = @_; |
my ($pkg, @repos) = @_; |
343 |
my @d = (); |
my @d = (); |
344 |
foreach my $repo ( @repos ) { |
foreach my $repo ( @repos ) { |
345 |
my $base = $distrepo->{$rel}->{repo}; |
my $base = $distrepo->{$rel}->{repo} . $repo; |
346 |
$base = $distrepo->{$rel}->{stage} if $repos->{$repo}->{stage}; |
$base = $distrepo->{$rel}->{stage} if $repos->{$repo}->{stage}; |
347 |
if ( $pkg->{arch} eq 'noarch' ) { |
if ( $pkg->{arch} eq 'noarch' ) { |
348 |
push @d, "$base$repo/i386/" . |
push @d, "$base/i386/" . |
349 |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
350 |
basename $pkg->{rpm}->filename; |
basename $pkg->{rpm}->filename; |
351 |
push @d, "$base$repo/x86_64/" . |
push @d, "$base/x86_64/" . |
352 |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
353 |
basename $pkg->{rpm}->filename; |
basename $pkg->{rpm}->filename; |
354 |
} elsif ( $pkg->{arch} =~ m{^(i[356]86)$} ) { |
} elsif ( $pkg->{arch} =~ m{^(i[356]86)$} ) { |
355 |
push @d, "$base$repo/i386/" . |
push @d, "$base/i386/" . |
356 |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
357 |
basename $pkg->{rpm}->filename; |
basename $pkg->{rpm}->filename; |
358 |
} elsif ( $pkg->{arch} eq 'x86_64' ) { |
} elsif ( $pkg->{arch} eq 'x86_64' ) { |
359 |
push @d, "$base$repo/x86_64/" . |
push @d, "$base/x86_64/" . |
360 |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
( $repos->{$repo}->{os} ? $distrepo->{$rel}->{os} : 'RPMS/' ) . |
361 |
basename $pkg->{rpm}->filename; |
basename $pkg->{rpm}->filename; |
362 |
} elsif ( $pkg->{arch} eq 'zsrc' ) { |
} elsif ( $pkg->{arch} eq 'zsrc' ) { |
363 |
push @d, "$base$repo/SRPMS/" . |
push @d, "$base/SRPMS/" . |
364 |
basename $pkg->{rpm}->filename; |
basename $pkg->{rpm}->filename; |
365 |
} else { |
} else { |
366 |
printline('bold yellow on_red', 1, ' - ', $pkg->{rpm}->filename, ' (bad arch: ', $pkg->{arch}, ')'); |
printline('bold yellow on_red', 1, ' - ', $pkg->{rpm}->filename, ' (bad arch: ', $pkg->{arch}, ')'); |
489 |
nosig => $nosig, |
nosig => $nosig, |
490 |
}; |
}; |
491 |
$sources{$srcname}++; |
$sources{$srcname}++; |
492 |
$latest{$pkg->name} = $rpms[$#rpms] if ! $pkg->is_source_package && ( ! $latest{$pkg->name} || $pkg gt $latest{$pkg->name}->{rpm} ); |
if ( ! $pkg->is_source_package && ! $repos->{$reponame}->{stage} ) { |
493 |
|
$latest{$pkg->name} = $rpms[$#rpms] if ! $latest{$pkg->name} || $pkg gt $latest{$pkg->name}->{rpm}; |
494 |
|
} |
495 |
} |
} |
496 |
|
|
497 |
sub loadbase { |
sub loadbase { |
512 |
return if grep { $_ eq $srcname } @{$skippkg->{$rel}->{$repo}}; |
return if grep { $_ eq $srcname } @{$skippkg->{$rel}->{$repo}}; |
513 |
$pkgrepo = $repo; |
$pkgrepo = $repo; |
514 |
return unless $pkg->is_source_package || $cmp; |
return unless $pkg->is_source_package || $cmp; |
515 |
return if ! $pkg->is_source_package && $pkg gt $cmp->{rpm} && rprop($cmp, 'base') && rprop($cmp, 'prio') > $repos->{$pkgrepo}->{prio}; |
return if ! $pkg->is_source_package && $pkg ge $cmp->{rpm} && rprop($cmp, 'base') && rprop($cmp, 'prio') > $repos->{$pkgrepo}->{prio}; |
516 |
last; |
last; |
517 |
} |
} |
518 |
} |
} |