Commit e0334808 authored by Marco Antoniotti's avatar Marco Antoniotti 💬
Browse files

Fixed issue about propagation of DELETE-BINARIES/CLEAN-SYSTEM operation to...

Fixed issue about propagation of DELETE-BINARIES/CLEAN-SYSTEM operation to systems which the current one depends on.
The solution may be too drastic, but it works.  The problema was that the operation was not propagated in the first place and this caused
the code to try to REQUIRE a foreign system that was not properly setup.
parent 039cfc57
Loading
Loading
Loading
Loading
+21 −10
Changes for defsystem.lisp: 21 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -1270,6 +1270,10 @@ and up to date.")
   of a system that are defined either using a component-type of :system
   or by another defsystem form.")

(defvar *operations-propagate-to-systems-depending-on* t
  "If T, operations like :COMPILE and :LOAD propagate to systems
   a system depends on.  Operations like :DELETE-BINARIES set this to NIL.")

;;; Particular to CMULisp

(defvar *compile-error-file-type* "err"
@@ -4648,10 +4652,15 @@ characters."
   :minimal-load minimal-load))


(defun clean-system (name &key (force :all)
			 ((:propagate *operations-propagate-to-subsystems*) nil)
(defun clean-system (name &key
                          (force :all)
                          ((:propagate-to-subsystems
                            *operations-propagate-to-subsystems*) nil)
                          ((:propagate-to-system-dependecies
                            *operations-propagate-to-systems-depending-on*) nil)
                          (version *version*)
			 (test *oos-test*) (verbose *oos-verbose*)
                          (test *oos-test*)
                          (verbose *oos-verbose*)
                          dribble)
  "Deletes all the binaries in the system."

@@ -4836,7 +4845,7 @@ characters."
                (tell-user-generic "Some system dependency for ~A failed."
                                   (component-name component))
                (if (component-non-required-p component)
                    (tell-user-generic "Dependency ignored as ~A in non required."
                    (tell-user-generic "Dependency ignored as ~A is not required."
                                       (component-name component))
                    (error e))
              )))
@@ -4936,7 +4945,12 @@ characters."
(defun operate-on-system-dependencies (component operation
                                                 &optional
                                                 (force *force*))
  (when *system-dependencies-delayed*
  (when (and *system-dependencies-delayed*
             *operations-propagate-to-systems-depending-on*)

    ;; Do nothing if we do not propagate to subsystems or systems this
    ;; one depends on.

    (let ((*force* force))

      (declare (special *force*))
@@ -4952,8 +4966,7 @@ characters."
	;; Explores the system tree in a DFS manner.

	;; Do not try to do anything with non system components.
        (cond ((and *operations-propagate-to-subsystems*
                    (not (listp system))
        (cond ((and (not (listp system))
		    (or (stringp system) (symbolp system))
                    ;; The subsystem is a defined system.
                    (find-system system :load-or-nil))
@@ -4984,8 +4997,7 @@ characters."
	      ;; Is the system "foreign"?  I.e., can it be found using
	      ;; FIND-FOREIGN-SYSTEM?

	      ((and *operations-propagate-to-subsystems*
                    (not (listp system))
	      ((and (not (listp system))
		    (or (stringp system) (symbolp system))
                    ;; The subsystem is a foreign defined system.
                    (find-foreign-system (string-downcase system)
@@ -5291,7 +5303,6 @@ characters."
                (eval default-action)))

          ;; If no system definition file, try regular require.
          ;; had last arg PATHNAME, but this wasn't really necessary.
          ((funcall *old-require* module-name))

          ;; If no default action, print a warning or error message.