aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-12-30 23:12:22 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-12-30 23:12:22 +0000
commitdc608f3ff0e841e33e04d9144c2681cd86acf658 (patch)
tree73d3b5e10ceaecff255366796fa9ae72bcbc3637 /lib
parentb7d82a33244743f0169d1ca0d78219f9901ba59f (diff)
downloadiurt-dc608f3ff0e841e33e04d9144c2681cd86acf658.tar
iurt-dc608f3ff0e841e33e04d9144c2681cd86acf658.tar.gz
iurt-dc608f3ff0e841e33e04d9144c2681cd86acf658.tar.bz2
iurt-dc608f3ff0e841e33e04d9144c2681cd86acf658.tar.xz
iurt-dc608f3ff0e841e33e04d9144c2681cd86acf658.zip
Try harder to decide which one is re-generated rpm
Diffstat (limited to 'lib')
-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";