--- a/usr/src/cmd/distro_const/__init__.py Mon Dec 20 15:30:30 2010 -0800
+++ b/usr/src/cmd/distro_const/__init__.py Tue Dec 21 13:38:55 2010 -0800
@@ -347,7 +347,7 @@
def setup_build_dataset(base_dataset, base_action, base_dataset_mp,
- resume_checkpoint=None):
+ resume_checkpoint=None, execute=True):
""" Setup the build datasets for use by DC. This includes setting up:
- top level build dataset
- a child dataset named 'build_data'
@@ -362,6 +362,9 @@
eng.register_checkpoint(TI_DICT["name"], TI_DICT["mod_path"],
TI_DICT["class"])
+ if not execute:
+ return
+
build_data = zfs_lib.Dataset(os.path.join(base_dataset, "build_data"))
empty_snap = zfs_lib.Dataset(os.path.join(base_dataset,
"build_data@empty"))
@@ -553,6 +556,12 @@
base_dataset, base_action, base_dataset_mp = validate_target()
if options.list_checkpoints:
+ # set the execute flag of setup_build_dataset to 'False'
+ # to prevent any actions from occuring. The TI checkpoint
+ # needs to be registered with the engine for list_checkpoints
+ # to work correctly.
+ setup_build_dataset(base_dataset, base_action, base_dataset_mp,
+ resume_checkpoint, execute=False)
# set the InstallEngine.dataset property to enable snapshots
eng.dataset = os.path.join(base_dataset, "build_data")