129 |
%sources = (); |
%sources = (); |
130 |
%base = (); |
%base = (); |
131 |
|
|
132 |
|
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{archs}}); |
133 |
|
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{archs}} ) { |
134 |
|
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
135 |
|
} |
136 |
|
|
137 |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
foreach my $dir ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) { |
138 |
my $bdir = $dir; |
my $bdir = $dir; |
139 |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
$bdir =~ s/~S/$distrepo->{$ver}->{repo}/; |
140 |
$bdir =~ s/~s/$ver/; |
$bdir =~ s/~s/$ver/; |
141 |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
$bdir =~ s/~C/$distrepo->{$ver}->{centos}/; |
142 |
for my $arch ( @{$distrepo->{$ver}->{'archs'}}, 'SRPMS/' ) { |
for my $arch ( @{$distrepo->{$ver}->{archs}}, 'SRPMS/' ) { |
143 |
my $adir = $bdir; |
my $adir = $bdir; |
144 |
if ( $arch eq 'SRPMS/' ) { |
if ( $arch eq 'SRPMS/' ) { |
145 |
$adir =~ s/~A.*//; |
$adir =~ s/~A.*//; |
167 |
last unless $dir =~ m{~A}; |
last unless $dir =~ m{~A}; |
168 |
} |
} |
169 |
} |
} |
170 |
find( { wanted => sub { process_rpm($_, $ver, 'builds'); }, no_chdir => 1, follow_fast => 1 }, "$_" ) foreach @{$distrepo->{$ver}->{'builds'}}; |
find( { wanted => sub { process_rpm($_, $ver, 'builds'); }, no_chdir => 1, follow_fast => 1 }, "$_" ) foreach @{$distrepo->{$ver}->{builds}}; |
171 |
find( { wanted => sub { process_rpm($_, $ver, 'community'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{'community'} ) if $distrepo->{$ver}->{'community'}; |
find( { wanted => sub { process_rpm($_, $ver, 'community'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{community} ) if $distrepo->{$ver}->{community}; |
172 |
|
|
173 |
foreach my $base ( sort keys %$rpms ) { |
foreach my $base ( sort keys %$rpms ) { |
174 |
next unless $rpms->{$base}->{rpms}; |
next unless $rpms->{$base}->{rpms}; |
300 |
} |
} |
301 |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
} elsif ( $repos->{$cmp->{repo}}->{stage} ) { |
302 |
$cmp->{delete}++; |
$cmp->{delete}++; |
303 |
} elsif ( $cmp->{src} || ( $cmp->{rpm}->arch =~ m{^(i[356]86)$} && grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) || |
} elsif ( $cmp->{src} || grep $_ eq $cmp->{rpm}->arch, @{$distrepo->{$ver}->{all_archs}} ) { |
|
grep $_ eq $cmp->{rpm}->arch, @{$distrepo->{$ver}->{'archs'}} ) { |
|
304 |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
$srpm = $cmp if ! $srpm && $cmp->{src}; |
305 |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
my $dest = $repos->{$track{repo}}->{prio} > $repos->{$devel2}->{prio} ? $track{repo} : $devel2; |
306 |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
$dest = pkgdest($cmp, $devel1, $dest, $rpms->{$base}->{rpms}); |
394 |
foreach my $a ( keys %{$acnt->{$r}->{$p}} ) { |
foreach my $a ( keys %{$acnt->{$r}->{$p}} ) { |
395 |
if ( $a eq 'noarch' ) { |
if ( $a eq 'noarch' ) { |
396 |
my $p2 = ${$acnt->{$r}->{$p}->{$a}}[0]; |
my $p2 = ${$acnt->{$r}->{$p}->{$a}}[0]; |
397 |
if ( ! $p2->{repos} && scalar @{$acnt->{$r}->{$p}->{$a}} != scalar @{$distrepo->{$ver}->{'archs'}} ) { |
if ( ! $p2->{repos} && scalar @{$acnt->{$r}->{$p}->{$a}} != scalar @{$distrepo->{$ver}->{archs}} ) { |
398 |
$p2->{oldrepo} = $p2->{repo}; |
$p2->{oldrepo} = $p2->{repo}; |
399 |
push @{$p2->{repos}}, $p2->{repo}; |
push @{$p2->{repos}}, $p2->{repo}; |
400 |
} |
} |
452 |
if ( $pkg->{src} ) { |
if ( $pkg->{src} ) { |
453 |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename); |
454 |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
} elsif ( $pkg->{rpm}->arch eq 'noarch' ) { |
455 |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{archs}}; |
456 |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
457 |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
458 |
} else { |
} else { |
496 |
} |
} |
497 |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
498 |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
499 |
foreach my $arch ( @{$distrepo->{$ver}->{'archs'}} ) { |
foreach my $arch ( @{$distrepo->{$ver}->{archs}} ) { |
500 |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
501 |
$dir = qx(readlink -f $dir); |
$dir = qx(readlink -f $dir); |
502 |
if ( $dir ) { |
if ( $dir ) { |