Skip to content

Commit 1c2427d

Browse files
committed
Removed unnecessary packages promise on SuSE
This packages promise was in place to provide package inventory used by packagematching() and packageupdatesmatching() out of the box. This is not needed since ENT-5480 introduced the zypper package module. Ticket: ENT-6375 Changelog: Title
1 parent 81ffabd commit 1c2427d

1 file changed

Lines changed: 6 additions & 41 deletions

File tree

inventory/any.cf

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,11 @@ bundle agent cfe_autorun_inventory_packages
10201020
fileexists("$(sys.workdir)/state/software_packages.csv"),
10211021
};
10221022

1023+
"use_package_module_for_inventory" or => { "redhat", "debian", "suse", "sles", "alpinelinux" };
1024+
"use_package_method_for_inventory" or => { "gentoo", "aix" };
1025+
"use_package_method_generic_for_inventory"
1026+
not => "use_package_module_for_inventory|use_package_method_for_inventory";
1027+
10231028
vars:
10241029
# if we have the patches, 7 days; otherwise keep trying
10251030
"refresh" string => ifelse("have_inventory", "10080",
@@ -1033,12 +1038,6 @@ bundle agent cfe_autorun_inventory_packages
10331038
# exists. As package modules become available the package_methods should be
10341039
# removed.
10351040

1036-
suse|sles::
1037-
"cfe_internal_non_existing_package"
1038-
package_policy => "add",
1039-
package_method => inventory_zypper($(refresh)),
1040-
action => if_elapsed_day;
1041-
10421041
aix::
10431042
"cfe_internal_non_existing_package"
10441043
package_policy => "add",
@@ -1051,7 +1050,7 @@ bundle agent cfe_autorun_inventory_packages
10511050
package_method => emerge,
10521051
action => if_elapsed_day;
10531052

1054-
!redhat.!debian.!gentoo.!(suse|sles).!aix::
1053+
use_package_method_generic_for_inventory::
10551054
"cfe_internal_non_existing_package"
10561055
package_policy => "add",
10571056
package_method => generic,
@@ -1091,40 +1090,6 @@ body package_method inventory_lslpp(update_interval)
10911090
package_verify_command => "/usr/bin/true";
10921091
}
10931092

1094-
body package_method inventory_zypper(update_interval)
1095-
# @depends common_knowledge rpm_knowledge suse_knowledge
1096-
# @brief SUSE zypper installation method for inventory purposes only
1097-
# @param update_interval how often to update the package and patch list
1098-
#
1099-
# This package method is a copy of the SUSE zypper method just for
1100-
# inventory purposes.
1101-
{
1102-
package_changes => "bulk";
1103-
1104-
package_list_command => "$(paths.path[rpm]) -qa --queryformat \"i | repos | %{name} | %{version}-%{release} | %{arch}\n\"";
1105-
1106-
# set it to "0" to avoid caching of list during upgrade
1107-
package_list_update_command => "$(suse_knowledge.call_zypper) list-updates";
1108-
package_list_update_ifelapsed => $(update_interval);
1109-
1110-
package_patch_list_command => "$(suse_knowledge.call_zypper) patches";
1111-
package_installed_regex => "i.*";
1112-
package_list_name_regex => "$(rpm_knowledge.rpm_name_regex)";
1113-
package_list_version_regex => "$(rpm_knowledge.rpm_version_regex)";
1114-
package_list_arch_regex => "$(rpm_knowledge.rpm_arch_regex)";
1115-
1116-
package_patch_installed_regex => ".*Installed.*|.*Not Applicable.*";
1117-
package_patch_name_regex => "[^|]+\|\s+([^\s]+).*";
1118-
package_patch_version_regex => "[^|]+\|[^|]+\|\s+([^\s]+).*";
1119-
1120-
package_name_convention => "$(name)";
1121-
package_add_command => "$(suse_knowledge.call_zypper) --help >/dev/null 2>&1 ; /bin/true";
1122-
package_delete_command => "$(suse_knowledge.call_zypper) --non-interactive remove --force-resolution";
1123-
package_update_command => "$(suse_knowledge.call_zypper) --non-interactive update";
1124-
package_patch_command => "$(suse_knowledge.call_zypper) --non-interactive patch$"; # $ means no args
1125-
package_verify_command => "$(suse_knowledge.call_zypper) --non-interactive verify$";
1126-
}
1127-
11281093
bundle agent cfe_autorun_inventory_cmdb
11291094
# @brief Copy and load the CMDB inventory
11301095
#

0 commit comments

Comments
 (0)