aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-09 15:32:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-09 15:32:15 +0000
commitb6fd026b754a0898a4d244a7a33afc2d610109ab (patch)
tree2babfa8323ba957f78ea3aeee292b10b57c21e6b
parent52334ed4fe80a680beb64152b3d31b304ed0f2f1 (diff)
downloadrpmtools-b6fd026b754a0898a4d244a7a33afc2d610109ab.tar
rpmtools-b6fd026b754a0898a4d244a7a33afc2d610109ab.tar.gz
rpmtools-b6fd026b754a0898a4d244a7a33afc2d610109ab.tar.bz2
rpmtools-b6fd026b754a0898a4d244a7a33afc2d610109ab.tar.xz
rpmtools-b6fd026b754a0898a4d244a7a33afc2d610109ab.zip
never create broken symlinks for "alternate location" of hdlist/synthesis/pubkey
-rwxr-xr-xgendistrib6
1 files changed, 4 insertions, 2 deletions
diff --git a/gendistrib b/gendistrib
index 3975063..b31547c 100755
--- a/gendistrib
+++ b/gendistrib
@@ -159,7 +159,7 @@ foreach my $e (@hdlists) {
hdlist_alternate_location($e->{hdlist2}, $e->{hdlist});
hdlist_alternate_location($e->{synthesis2}, $e->{synthesis});
$e->{pubkey2} =~ s/ /_/g; # workaround MDV::Distribconf issue
- hdlist_alternate_location($e->{pubkey2}, $e->{pubkey}) if -e $e->{pubkey};
+ hdlist_alternate_location($e->{pubkey2}, $e->{pubkey});
}
if (grep { ! $_->{noneedrebuild} } @hdlists) {
@@ -214,7 +214,9 @@ if (grep { ! ($_->{noneedrebuild} && $_->{noneedredomd5}) } @hdlists) {
sub hdlist_alternate_location {
my ($alternate, $main) = @_;
- if (-l $alternate && inode($alternate) == inode($main)) {
+ if (! -e $main) {
+ print STDERR "missing $main, not creating alternate location $alternate\n";
+ } elsif (-l $alternate && inode($alternate) == inode($main)) {
# ok
} else {
if (-l $alternate) {