def METHOD_NAME(mutable_config, mutable_database):
    """End-to-end test of CLI concretizer prefs.
    It's here to make sure that everything works from CLI
    options to `solver.py`, and that config options are not
    lost along the way.
    """
    # remove two non-preferred mpileaks installations
    # so that reuse will pick up the zmpi one
    uninstall = SpackCommand("uninstall")
    uninstall("-y", "mpileaks^mpich")
    uninstall("-y", "mpileaks^mpich2")
    # get the hash of mpileaks^zmpi
    mpileaks_zmpi = spack.store.STORE.db.query_one("mpileaks^zmpi")
    h = mpileaks_zmpi.dag_hash()[:7]
    output = spec("--fresh", "-l", "mpileaks")
    assert h not in output
    output = spec("--reuse", "-l", "mpileaks")
    assert h in output