#######################################################
#
# Test delete a package
#
#######################################################

body common control
{
  inputs => { "../default.sub.cf" };
  bundlesequence  => { "test_warn_delete_pkg" };
  version => "1.0";
}

#######################################################

bundle agent test_warn_delete_pkg
{
packages:
  "bash"
    package_policy => "delete",
    package_method => mock_warn_delete_pkg,
    package_select => ">=",
    package_version => "4.2.8",
    package_architectures => {"x86_64"};
}

body package_method mock_warn_delete_pkg
{
  package_changes => "individual";

  package_list_command => "$(G.printf) 'bash-4.2.8-x86_64'";

  package_list_name_regex => "^([^-]+)";
  package_list_version_regex => "^[^-]+-([^-]+)";
  package_list_arch_regex => "^[^-]+-[^-]+-(.*)";
  package_installed_regex => ".*";

  package_add_command => "$(G.false)";
  package_update_command => "$(G.false)";
  package_delete_command => "$(G.true)";
  package_verify_command => "$(G.false)";
}
