aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Urpmi.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r--lib/Iurt/Urpmi.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index a08c67b..042ec8f 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -676,16 +676,13 @@ sub recreate_srpm {
# .
# assigning '.' to $new_rpm. Now sorting the output.
- # we should better perform a rpm -qp -qf "%{name}-%{version}-%{release}.src.rpm" $spec
+ # we can not ask rpm the generated srpm name
+ # we can not rely on build time (one of the src.rpm may have been built on a machine with wrong time)
+ # let's say that if we have several one, we want the non original one
my $file;
- my $stat;
foreach my $f (glob "$chroot_tmp/home/$luser/rpm/SRPMS/$name-*.src.rpm") {
- my (@s) = stat $f;
- if ($s[9] > $stat) {
- $file = $f;
- $stat = $s[9];
- }
- }
+ $file = $f if $f ne $oldsrpm;
+ }
my ($new_srpm) = basename($file);
my $prefix = get_package_prefix($srpm);
my $newfile = "$chroot_tmp/home/$luser/rpm/SRPMS/$prefix$new_srpm";