          (format "%S is configured in the dotfile." pkg-name)))
        ((eq 'local (oref pkg :location))
         (let* ((owner (object-assoc (oref pkg :owner)
-                                    :name configuration-layer-layers))
+                                    :name configuration-layer--layers))
                (dir (oref owner :dir)))
           (push (format "%slocal/%S/" dir pkg-name) load-path)
           ;; TODO remove extensions in 0.105.0

          (add-to-list 'imp-pkgs pkg-sym))))
    imp-pkgs))

(defun configuration-layer//get-orphan-packages (implicit-pkgs dependencies)
  "Return orphan packages."
  (let (result)
    (dolist (imp-pkg implicit-pkgs)
      (when (configuration-layer//is-package-orphan imp-pkg dependencies)
        (add-to-list 'result imp-pkg)))
    result))

(defun configuration-layer//is-package-orphan (pkg-name dependencies)
  "Returns not nil if PKG-NAME is the name of an orphan package."
  (unless (object-assoc pkg-name :name configuration-layer-packages)
    (if (ht-contains? dependencies pkg-name)
        (let ((parents (ht-get dependencies pkg-name)))
          (reduce (lambda (x y) (and x y))
                  (mapcar (lambda (p) (configuration-layer//is-package-orphan
                                       p dependencies))
                          parents)
                  :initial-value t))
      (not (object-assoc pkg-name :name configuration-layer-packages)))))

(defun configuration-layer//get-package-directory (pkg-name)
  "Return the directory path for package with name PKG-NAME."

      (setq installed-count 0)
      (dolist (pkg-name noinst-pkg-names)
        (setq installed-count (1+ installed-count))
        (let* ((pkg (object-assoc pkg-name :name configuration-layer--packages))
               (layer (when pkg (oref pkg :owner)))
               (location (when pkg (oref pkg :location))))
          (spacemacs-buffer/replace-last-line
