Discussion:
[software/build-system/iurt] branch master updated (50a2ca1 -> ab201eb)
root-odJJhXpcy38dnm+
2014-10-12 11:59:09 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

pterjan pushed a change to branch master
in repository software/build-system/iurt.

from 50a2ca1 kill now useless 'clean' rule
new ab201eb Remove old src.rpm before recreating it (mga#14243)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
NEWS | 2 ++
lib/Iurt/Urpmi.pm | 14 ++++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
--
Mageia Git Monkeys.
root-odJJhXpcy38dnm+
2014-10-12 11:59:10 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

pterjan pushed a commit to branch master
in repository software/build-system/iurt.

commit ab201ebc3d8b92a77f204634e22566b8351f9319
Author: Pascal Terjan <pterjan-wSZih8+RwX/***@public.gmane.org>
Date: Sun Oct 12 12:57:40 2014 +0100

Remove old src.rpm before recreating it (mga#14243)
---
Commit Link:
http://gitweb.mageia.org/software/build-system/iurt/commit/?id=ab201ebc3d8b92a77f204634e22566b8351f9319

Bug links:
Mageia
https://bugs.mageia.org/show_bug.cgi?id=14243

NEWS | 2 ++
lib/Iurt/Urpmi.pm | 14 ++++++--------
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 6a1c052..05b9c8b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- remove old src.rpm before recreating it (mga#14243)
+
0.6.22
- don't close stdin if --stop is used (mga#13318)
- add a README
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index e2f305d..c8f3bbd 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -629,7 +629,11 @@ sub recreate_srpm {
$spec = $file;
}
}
- }
+ }
+
+ # Delete old src.rpm, we will create it again
+ sudo($config, '--rm', $oldsrpm) or die "$program_name: could not delete $oldsrpm ($!)";
+
# 20060515 This should not be necessairy any more if urpmi *.spec works, but it doesn't
#
my $ret = perform_command(qq(chroot $chroot_tmp su $luser -c "rpmbuild --nodeps -bs $with_flags /home/$luser/rpmbuild/SPECS/$spec"),
@@ -645,13 +649,7 @@ sub recreate_srpm {
#
return 0 unless $ret;

- # 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 = $oldsrpm;
- foreach my $f (glob "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$name-*.src.rpm") {
- $file = $f if $f ne $oldsrpm;
- }
+ my $file = (glob "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$name-*.src.rpm")[0];
my ($new_srpm) = basename($file);
my $prefix = get_package_prefix($srpm);
my $newfile = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$prefix$new_srpm";
--
Mageia Git Monkeys.
Loading...