Index: mtut.scm ================================================================== --- mtut.scm +++ mtut.scm @@ -74,10 +74,11 @@ Contour actions: import : import pkts dispatch : dispatch queued run jobs from imported pkts rungen : look at input sense list in [rungen] and generate run pkts + process : runs import, rungen and dispatch Selectors -immediate : apply this action immediately, default is to queue up actions -area areapatt1,area2... : apply this action only to the specified areas -target key1/key2/... : run for key1, key2, etc. @@ -378,11 +379,11 @@ ;; get the timestamp for when that run started and pass it ;; to the rule logic here where "ruletype" will be applied ;; if it comes back "changed" then proceed to register the runs (case (string->symbol ruletype) - ((file) + ((file file-or) ;; one or more files must be newer than the reference (let* ((file-globs (cdr valparts)) (youngestdat (common:get-youngest file-globs)) (youngestmod (car youngestdat))) ;; (print "youngestmod: " youngestmod " starttimes: " starttimes) (if (null? starttimes) ;; this target has never been run @@ -392,11 +393,29 @@ (if (> youngestmod (cdr starttime)) (begin (print "starttime younger than youngestmod: " starttime " Youngestmod: " youngestmod) (configf:section-var-set! torun contour runkey `(,(conc ruletype ":" (cadr youngestdat)) ,runname))))) starttimes)) - ))))) + )) + ((file-and) ;; all files must be newer than the reference + (let* ((file-globs (cdr valparts)) + (youngestdat (common:get-youngest file-globs)) + (youngestmod (car youngestdat)) + (success #t)) ;; any cases of not true, set flag to #f for AND + ;; (print "youngestmod: " youngestmod " starttimes: " starttimes) + (if (null? starttimes) ;; this target has never been run + (configf:section-var-set! torun contour runkey `("file:neverrun" ,runname)) + (for-each + (lambda (starttime) ;; look at the time the last run was kicked off for this contour + (if (< youngestmod (cdr starttime)) + (set! success #f))) + starttimes)) + (if success + (begin + (print "starttime younger than youngestmod: " starttime " Youngestmod: " youngestmod) + (configf:section-var-set! torun contour runkey `(,(conc ruletype ":" (cadr youngestdat)) ,runname)))))) + ))) keydats))) (hash-table-keys rgconf)) ;; now have torun populated (for-each