[tbb-commits] [rbm/master] Bug 33990: Initialize step in non-build commands

gk at torproject.org gk at torproject.org
Mon Apr 27 11:04:49 UTC 2020


commit 18b396fb08ee9ee9311de7b8224197282f0935fe
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Fri Apr 24 16:01:23 2020 +0200

    Bug 33990: Initialize step in non-build commands
    
    When using the build command, step gets initialized to 'build'. However
    this was not done in some of the other non-build commands where the
    value of step was left to rbm_init.
---
 rbm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/rbm b/rbm
index 5d6417b..6b31185 100755
--- a/rbm
+++ b/rbm
@@ -109,6 +109,9 @@ sub set_options {
     }
     RBM::load_system_config(@_);
     RBM::load_local_config(@_);
+    if (!defined $val{step} && @_) {
+        $RBM::config->{step} = RBM::project_config($_[0], 'pkg_type');
+    }
     return $RBM::config->{run}{args} = \@_;
 }
 
@@ -172,9 +175,9 @@ sub build_script {
     my $script_name = shift;
     usageexit($_[0]) unless @_ >= 2;
     my $cmd = shift;
-    my $args = set_options(@_);
+    my $args = set_options("--step=$script_name", @_);
     usageexit($cmd) unless @$args == 1;
-    $script_name = $RBM::config->{step} if $RBM::config->{step} ne 'rbm_init';
+    $script_name = $RBM::config->{step};
     RBM::build_pkg($args->[0], { pkg_type => $script_name });
 }
 



More information about the tbb-commits mailing list