     (mocker-let ((file-exists-p (f) ((:output t :occur 1)
                                      (:output nil :occur 1)))
                  (configuration-layer/layer-usedp (l) ((:output t :occur 1))))
-                (should (equal '([object cfgl-package "pkg3" pkg3 dotfile nil nil elpa nil nil]
-                                 [object cfgl-package "pkg2" pkg2 layer12 nil nil elpa nil nil]
-                                 [object cfgl-package "pkg1" pkg1 layer12 nil nil elpa nil nil])
+                (should (equal (list (cfgl-package "pkg3" :name 'pkg3 :owner 'dotfile)
+                                     (cfgl-package "pkg2" :name 'pkg2 :owner 'layer12)
+                                     (cfgl-package "pkg1" :name 'pkg1 :owner 'layer12))
                                (configuration-layer/get-packages layers t))))))
 
 ;; TODO remove extensions tests in 0.105.0

    (mocker-let ((file-exists-p (f) ((:output t :occur 1)
                                     (:output nil :occur 1)))
                 (configuration-layer/layer-usedp (l) ((:output t :occur 1))))
                (should (equal '([object cfgl-package "pkg3" pkg3 layer1 nil nil elpa nil nil]
                                 [object cfgl-package "pkg2" pkg2 layer1 nil nil elpa nil nil]
                                 [object cfgl-package "pkg1" pkg1 layer1 nil nil elpa nil nil])
                               (configuration-layer/get-packages layers))))))

(ert-deftest test-get-packages--lists-only ()
  (let* ((layer1 (cfgl-layer "layer1" :name 'layer1 :dir "/path"))
         (layers (list layer1))
         (layer1-packages '((pkg1 :location elpa)
                                (pkg2 :location recipe)
                                (pkg3 :location local :step pre)))
         (mocker-mock-default-record-cls 'mocker-stub-record))
    (defun layer1/init-pkg1 nil)
    (defun layer1/init-pkg2 nil)

    (mocker-let ((file-exists-p (f) ((:output t :occur 1)
                                     (:output nil :occur 1)))
                 (configuration-layer/layer-usedp (l) ((:output t :occur 1))))
                (should (equal (list (cfgl-package "pkg3" :name 'pkg3 :owner 'layer11)
                                     (cfgl-package "pkg2" :name 'pkg2 :owner 'layer11 :excluded t)
                                     (cfgl-package "pkg1" :name 'pkg1 :owner 'layer11))
                               (configuration-layer/get-packages layers t))))))

(ert-deftest test-get-packages--dotfile-declares-and-owns-one-additional-package ()
