307 |
|
|
308 |
my $src = $pkg->{rpm}->filename; |
my $src = $pkg->{rpm}->filename; |
309 |
if ( $pkg->{nosig} ) { |
if ( $pkg->{nosig} ) { |
310 |
print "sign package (", $pkg->{repo}, ", ", basename($pkg->{rpm}->filename), ")\n"; |
print "sign package (", basename($pkg->{rpm}->filename), ")\n"; |
311 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
312 |
qx(cat $HOME/.rpmpass | setsid rpm --addsign $src >& /dev/null); |
qx(cat $HOME/.rpmpass | setsid rpm --addsign $src >& /dev/null); |
313 |
if ($?) { |
if ($?) { |
351 |
} |
} |
352 |
qx(rm -f $src) if exists $pkg->{delete} && ! $opts{t}; |
qx(rm -f $src) if exists $pkg->{delete} && ! $opts{t}; |
353 |
} elsif ( $pkg->{delete} ) { |
} elsif ( $pkg->{delete} ) { |
354 |
print "delete from ", $pkg->{repo}, " (", basename($pkg->{rpm}->filename), ")\n"; |
print "delete from ", $pkg->{repo}, " (", $pkg->{arch}, ", ", basename($pkg->{rpm}->filename), ")\n"; |
355 |
qx(rm -f $src) unless $opts{t}; |
qx(rm -f $src) unless $opts{t}; |
356 |
$repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage}; |
$repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage}; |
357 |
} |
} |
370 |
print "rebuild $repo/$arch\n"; |
print "rebuild $repo/$arch\n"; |
371 |
unless ( $opts{t} ) { |
unless ( $opts{t} ) { |
372 |
if ( -f "$dir/repodata/comps.xml" ) { |
if ( -f "$dir/repodata/comps.xml" ) { |
373 |
qx(createrepo -g $dir/repodata/comps.xml $dir); |
qx(createrepo -g repodata/comps.xml $dir); |
374 |
} else { |
} else { |
375 |
qx(createrepo $dir); |
qx(createrepo $dir); |
376 |
} |
} |
440 |
return if $skippkg->{$smever}->{$repo} && $skippkg->{$smever}->{$repo}->{$src}; |
return if $skippkg->{$smever}->{$repo} && $skippkg->{$smever}->{$repo}->{$src}; |
441 |
return if $repos->{$repo}->{base} && $nosig; |
return if $repos->{$repo}->{base} && $nosig; |
442 |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; } |
443 |
|
my $arch = 'unknown'; |
444 |
|
$arch = 'SRPMS' if $pkg->filename =~ m{[/-](SRPMS?|src|source)/}; |
445 |
|
$arch = 'x86_64' if $pkg->filename =~ m{[/-]x86_64/}; |
446 |
|
$arch = 'i386' if $pkg->filename =~ m{[/-](i[356]86)/}; |
447 |
|
$arch = 'noarch' if $pkg->filename =~ m{[/-]noarch/}; |
448 |
|
|
449 |
my $rpmhash = { base => $src, |
my $rpmhash = { base => $src, |
450 |
name => $pkg->name, |
name => $pkg->name, |
452 |
nvra => $pkg->name.'-'.$pkg->version.'-'.$pkg->release.'.'.( $pkg->is_source_package ? 'src' : $pkg->tag('ARCH') ), |
nvra => $pkg->name.'-'.$pkg->version.'-'.$pkg->release.'.'.( $pkg->is_source_package ? 'src' : $pkg->tag('ARCH') ), |
453 |
svr => $src.'-'.$version.'-'.$release, |
svr => $src.'-'.$version.'-'.$release, |
454 |
src => $pkg->is_source_package, |
src => $pkg->is_source_package, |
455 |
|
arch => $arch, |
456 |
ver => $version, |
ver => $version, |
457 |
rel => $release, |
rel => $release, |
458 |
rpm => $pkg, |
rpm => $pkg, |