129 |
%sources = (); |
%sources = (); |
130 |
%base = (); |
%base = (); |
131 |
|
|
132 |
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{archs}}); |
@{$distrepo->{$ver}->{all_archs}} = ('noarch', @{$distrepo->{$ver}->{'archs'}}); |
133 |
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{archs}} ) { |
if ( grep $_ eq 'i386', @{$distrepo->{$ver}->{'archs'}} ) { |
134 |
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
push @{$distrepo->{$ver}->{all_archs}}, ('i586', 'i686'); |
135 |
} |
} |
136 |
|
|
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}; |
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 ($ver>=10 && $pkg->{rpm}->arch =~ m{^(i[356]86)$} && $pkg->{arch} =~ m{^(x86_64)$} ) { |
457 |
|
#add copy of i686 packages in x86_64 folder for SME>=10 |
458 |
|
push @d, map { "${head}$_/$tail" . basename($pkg->{rpm}->filename) } @{$distrepo->{$ver}->{'archs'}}; |
459 |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
} elsif ( $pkg->{rpm}->arch =~ m{^(i[356]86)$} ) { |
460 |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
push @d, "${head}i386/$tail" . basename($pkg->{rpm}->filename); |
461 |
} else { |
} else { |
499 |
} |
} |
500 |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) { |
501 |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage}; |
502 |
foreach my $arch ( @{$distrepo->{$ver}->{archs}} ) { |
foreach my $arch ( @{$distrepo->{$ver}->{'archs'}} ) { |
503 |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch"; |
504 |
$dir = qx(readlink -f $dir); |
$dir = qx(readlink -f $dir); |
505 |
if ( $dir ) { |
if ( $dir ) { |
530 |
} |
} |
531 |
} |
} |
532 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
533 |
foreach (@{$distrepo->{$ver}->{builds}}) |
foreach (@{$distrepo->{$ver}->{'builds'}}) |
534 |
{ |
{ |
535 |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
finddepth(sub{rmdir}, "$_") if -d "$_"; |
536 |
} |
} |
537 |
finddepth(sub{rmdir}, $distrepo->{$ver}->{community}) if -d "$distrepo->{$ver}->{community}"; |
finddepth(sub{rmdir}, $distrepo->{$ver}->{'community'}) if -d "$distrepo->{$ver}->{'community'}"; |
538 |
} |
} |
539 |
} |
} |
540 |
|
|