@@ -2378,24 +2378,21 @@ def handle_iterate_opts(self):
23782378 # handle configure/build/install options that are specified as lists (+ perhaps builddependencies)
23792379 # set first element to be used, keep track of list in self.iter_opts
23802380 # only needs to be done during first iteration, since after that the options won't be lists anymore
2381- if self .iter_idx == 0 :
2381+ if self .iter_idx == 0 and self . det_iter_cnt () > 1 :
23822382 # keep track of list, supply first element as first option to handle
2383- iter_cnt = self .det_iter_cnt ()
2384- for opt in self .cfg .iterate_options :
2385- if isinstance (self .cfg [opt ], (list , tuple )):
2386- self .iter_opts [opt ] = self .cfg [opt ] # copy
2387- elif iter_cnt > 1 :
2388- # make iter_cnt copies for every opt since easyblocks can modify them
2389- self .iter_opts [opt ] = [self .cfg [opt ]] * iter_cnt
2390- self .log .debug ("Found list for %s: %s" , opt , self .iter_opts [opt ])
2383+ for opt in self .cfg .ITERATE_OPTIONS :
2384+ self .iter_opts [opt ] = self .cfg [opt ] # copy
2385+ self .log .debug ("Iterating opt %s: %s" , opt , self .iter_opts [opt ])
23912386
23922387 if self .iter_opts :
23932388 print_msg ("starting iteration #%s ..." % self .iter_idx , log = self .log , silent = self .silent )
23942389 self .log .info ("Current iteration index: %s" , self .iter_idx )
23952390
23962391 # pop first element from all iterative easyconfig parameters as next value to use
23972392 for opt , value in self .iter_opts .items ():
2398- if len (value ) > self .iter_idx :
2393+ if opt not in self .cfg .iterate_options :
2394+ self .cfg [opt ] = value
2395+ elif len (value ) > self .iter_idx :
23992396 self .cfg [opt ] = value [self .iter_idx ]
24002397 else :
24012398 self .cfg [opt ] = '' # empty list => empty option as next value
0 commit comments