aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2023-01-19 20:16:19 +0000
committerPascal Terjan <pterjan@mageia.org>2023-01-19 20:16:19 +0000
commit742b60ce924a0a780c97e6fb983b594d6a3319f2 (patch)
tree6e98e44c168b912454e50ffba50264bbf193f6d7 /lib
parentba79fd27ee268ef00b90aa1e7eb4c87a63ab72e1 (diff)
downloadiurt-742b60ce924a0a780c97e6fb983b594d6a3319f2.tar
iurt-742b60ce924a0a780c97e6fb983b594d6a3319f2.tar.gz
iurt-742b60ce924a0a780c97e6fb983b594d6a3319f2.tar.bz2
iurt-742b60ce924a0a780c97e6fb983b594d6a3319f2.tar.xz
iurt-742b60ce924a0a780c97e6fb983b594d6a3319f2.zip
Minor cleanup
No need for 2 variables with the same content.
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Urpmi.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index d09383f..7d079ea 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -533,13 +533,12 @@ sub recreate_srpm {
plog("ERROR: failed to get the name of the generated src.rpm");
return;
}
- my $generated_srpm_name = cat_("$chroot_tmp/home/$luser/rpmbuild/SPECS/$spec.srpm_name");
- if (!$generated_srpm_name) {
+ my $new_srpm = cat_("$chroot_tmp/home/$luser/rpmbuild/SPECS/$spec.srpm_name");
+ if (!$new_srpm) {
plog("ERROR: failed to get the name of the generated src.rpm");
return;
}
- my $file = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$generated_srpm_name";
- my ($new_srpm) = basename($file);
+ my $file = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$new_srpm";
my $prefix = get_package_prefix($srpm);
my $newfile = "$chroot_tmp/home/$luser/rpmbuild/SRPMS/$prefix$new_srpm";
if (-f $file && $newfile ne $file) {