aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-05-21 21:24:15 +0000
committerNicolas Vigier <boklm@mageia.org>2013-05-21 21:24:15 +0000
commit4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e (patch)
treeb320ddf3475b2ee2bced30f616774434e4924cf7
parent8fc4203c7786e025830027da80da50061ef86d22 (diff)
downloadrelease-4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e.tar
release-4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e.tar.gz
release-4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e.tar.bz2
release-4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e.tar.xz
release-4ac44fe6a22e58fffc63ba7dca897b2fdc8db46e.zip
Try path with and without epoch
URPM::Package::epoch() does not seems to make a difference between epoch 0 and no epoch and returns 0 in both cases.
-rw-r--r--MgaRelease/Common.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/MgaRelease/Common.pm b/MgaRelease/Common.pm
index a4c38af..41dba72 100644
--- a/MgaRelease/Common.pm
+++ b/MgaRelease/Common.pm
@@ -28,7 +28,7 @@ sub make_srpms_list_from_synthesis {
$urpm->traverse(sub {
$srpms_list->{$_[0]->name}->{version} = $_[0]->version;
$srpms_list->{$_[0]->name}->{release} = $_[0]->release;
- $srpms_list->{$_[0]->name}->{epoch} = $_[0]->epoch if $_[0]->epoch;
+ $srpms_list->{$_[0]->name}->{epoch} = $_[0]->epoch;
});
}
@@ -55,10 +55,9 @@ sub path_rev
sub get_srpms_rev {
my $ra = SVN::Ra->new(config()->{svn_repourl});
foreach my $pkg (keys %$srpms_list) {
- my ($ver, $rel) = @{$srpms_list->{$pkg}}{qw/version release/};
- my $epoch = $srpms_list->{$pkg}->{epoch} ?
- $srpms_list->{$pkg}->{epoch} . ':' : '';
- $svnrev = path_rev($ra, "cauldron/$pkg/releases/$epoch$ver/$rel");
+ my ($ver, $rel, $epoch) = @{$srpms_list->{$pkg}}{qw/version release epoch/};
+ $svnrev = path_rev($ra, "cauldron/$pkg/releases/$epoch:$ver/$rel");
+ $svnrev = path_rev($ra, "cauldron/$pkg/releases/$ver/$rel") unless $svnrev;
$srpms_list->{$pkg}->{svnrev} = $svnrev if $svnrev;
}
}