def move_pack(
    abs_repo_base,
    pack_name,
    abs_local_path,
    pack_metadata,
    force_owner_group=True,
    force_permissions=True,
    logger=LOG,
):
    """
    Move pack directory into the final location.
    """
    desired, message = is_desired_pack(abs_local_path, pack_name)

    if desired:
        to = abs_repo_base
        dest_pack_path = os.path.join(abs_repo_base, pack_name)
        if os.path.exists(dest_pack_path):
            logger.debug(
                "Removing existing pack %s in %s to replace.", pack_name, dest_pack_path
            )

            # Ensure to preserve any existing configuration
            old_config_file = os.path.join(dest_pack_path, CONFIG_FILE)
            new_config_file = os.path.join(abs_local_path, CONFIG_FILE)

            if os.path.isfile(old_config_file):
                shutil.move(old_config_file, new_config_file)

            shutil.rmtree(dest_pack_path)

        logger.debug("Moving pack from %s to %s.", abs_local_path, to)
        shutil.move(abs_local_path, dest_pack_path)

        # post move fix all permissions
        if force_owner_group:
            # 1. switch owner group to configured group
            apply_pack_owner_group(pack_path=dest_pack_path)

        if force_permissions:
            # 2. Setup the right permissions and group ownership
            apply_pack_permissions(pack_path=dest_pack_path)

        # Log warning if python2 only supported
        warning = get_pack_warnings(pack_metadata)
        if warning:
            logger.warning(warning)

        message = "Success."
    elif message:
        message = "Failure : %s" % message

    return (desired, message)

    Move pack directory into the final location.
    
st2common/st2common/util/pack_management.py