summaryrefslogtreecommitdiffstats
path: root/t/02create_pkgs.t
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-26 15:04:38 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-29 14:44:10 +0200
commit8478a2d61b40936322e4350235b35b449c61e453 (patch)
treeb067a3287f9dad664dd41bd86f19e464e847ca22 /t/02create_pkgs.t
parent22a65b8bfd3d8d5ad2c30229c51e003f3a9256bd (diff)
downloadurpmi-8478a2d61b40936322e4350235b35b449c61e453.tar
urpmi-8478a2d61b40936322e4350235b35b449c61e453.tar.gz
urpmi-8478a2d61b40936322e4350235b35b449c61e453.tar.bz2
urpmi-8478a2d61b40936322e4350235b35b449c61e453.tar.xz
urpmi-8478a2d61b40936322e4350235b35b449c61e453.zip
split some variables for readability
Diffstat (limited to 't/02create_pkgs.t')
-rw-r--r--t/02create_pkgs.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t
index fe118250..9fbf232c 100644
--- a/t/02create_pkgs.t
+++ b/t/02create_pkgs.t
@@ -81,9 +81,11 @@ sub rpmbuild {
my $dir = getcwd();
my ($target) = $spec =~ m!-(i586|x86_64)\.spec$!;
+ $target = $target ? "--target $target" : '';
# unsetting %__os_install_post fixes failure to build on FreeBSD:
my $nopost = " --define '__os_install_post %nil'";
- system_("rpmbuild --quiet --define 'rpm_version %(rpm -q --queryformat \"%{VERSION}\" rpm|sed -e \"s/\\\\.//g\")' --define '_topdir $dir/tmp' --define '_tmppath $dir/tmp' -bb --clean --nodeps $nopost ".($target ? "--target $target" : "")." $spec");
+ my $rpmv = "--define 'rpm_version %(rpm -q --queryformat \"%{VERSION}\" rpm|sed -e \"s/\\\\.//g\")' ";
+ system_("rpmbuild --quiet $rpmv --define '_topdir $dir/tmp' --define '_tmppath $dir/tmp' -bb --clean --nodeps $nopost $target $spec");
my ($name) = $spec =~ m!([^/]*)\.spec$!;