          (upgrade-count (length update-packages))
          (upgraded-count 0)
          (update-packages-alist))
+    ;; (message "packages to udpate: %s" update-packages)
     (if (> upgrade-count 0)
         (if (and (not always-update)
                  (not (yes-or-no-p (format (concat "%s package(s) to update, "

(defvar configuration-layer-paths (make-hash-table :size 256)
  "Hash table of layers locations. The key is a layer symbol and the value is
the path for this layer.")

(defvar configuration-layer-all-packages-sorted '()
  "Sorted list of all package symbols.")

(defvar configuration-layer-categories '()
  "List of strings corresponding to category names. A category is a

   "--> fetching new package repository indexes...\n")
  (spacemacs//redisplay)
  (package-refresh-contents)
  (let* ((candidates (configuration-layer/filter-packages
                      configuration-layer-packages
                      (lambda (x) (and (not (null (oref x :owner)))
                                       (not (eq 'local (oref x :location)))
                                       (not (oref x :excluded))))))
         (update-packages (configuration-layer//get-packages-to-update
                           (mapcar 'car (object-assoc-list :name candidates))))
         (date (format-time-string "%y-%m-%d_%H.%M.%S"))
         (rollback-dir (expand-file-name
                        (concat configuration-layer-rollback-directory
