diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-04-30 10:31:28 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-05-01 00:35:11 +0200 |
commit | 04c9b1adee16b12d60cbd98bfe132ce31e5a45d0 (patch) | |
tree | 94eaabca73db6e0a1bb4fc5b2be2f1918eaa24c0 | |
parent | b88fc3624df20899dcce56714874d8db6b7ff558 (diff) | |
download | urpmi-04c9b1adee16b12d60cbd98bfe132ce31e5a45d0.tar urpmi-04c9b1adee16b12d60cbd98bfe132ce31e5a45d0.tar.gz urpmi-04c9b1adee16b12d60cbd98bfe132ce31e5a45d0.tar.bz2 urpmi-04c9b1adee16b12d60cbd98bfe132ce31e5a45d0.tar.xz urpmi-04c9b1adee16b12d60cbd98bfe132ce31e5a45d0.zip |
just use only one variable
Thus we got a shorter command which will help for next commits
-rw-r--r-- | t/02create_pkgs.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t index eaa52680..d6d48b71 100644 --- a/t/02create_pkgs.t +++ b/t/02create_pkgs.t @@ -86,11 +86,11 @@ sub rpmbuild { my $dir = getcwd(); my ($target) = $spec =~ m!-(i586|x86_64)\.spec$!; - $target = $target ? "--target $target" : ''; + my $extra_args = $target ? "--target $target" : ''; # unsetting %__os_install_post fixes failure to build on FreeBSD: - my $nopost = " --define '__os_install_post %nil'"; - 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"); + $extra_args .= " --define '__os_install_post %nil'"; + $extra_args .= " --define 'rpm_version %(rpm -q --queryformat \"%{VERSION}\" rpm|sed -e \"s/\\\\.//g\")' "; + system_("rpmbuild --quiet --define '_topdir $dir/tmp' --define '_tmppath $dir/tmp' -bb --clean --nodeps $extra_args $spec"); my ($name) = $spec =~ m!([^/]*)\.spec$!; |