Forum: Cfengine Help Subject: Patching - nothing happens for "add" Author: jonb1987 Link to topic: https://cfengine.com/forum/read.php?3,21892,21892#msg-21892
I have created a list of packages that should be added, and checked and tweaked the "package_method" bodies in cfengine_stdlib.cf, In the output when running "cf-agent -v" I see my extra packages referenced, but then nothing gets installed. I've run the install command manually on the command line and it works ok. I see from https://cfengine.com/forum/read.php?3,21816,21816#msg-21816 there's a hint that too many command line arguments may screw cfengine - is this really true? I'm using v3.0.5 Here's my promise... vars: suse_11_4:: "rpm_list" slist => readstringlist( "/usr/local/etc/asic_opensuse_11_4_rpms", "#.*", "\s+", "9999", "99999999999" ); packages: suse:: "$(rpm_list)" handle => "suse_package_add", comment => "Add extra suse packages", package_policy => "add", package_method => zypper; body package_method zypper { package_changes => "bulk"; package_list_command => "/usr/bin/zypper --non-interactive packages"; package_patch_list_command => "/usr/bin/zypper --non-interactive patches"; package_installed_regex => "i\s*\|.*"; package_list_name_regex => "[^|]+\|[^|]+\|\s+(\S+)\s.*"; package_list_version_regex => "[^|]+\|[^|]+\|[^|]+\|\s+(\S+)\s.*"; package_list_arch_regex => "[^|]+\|[^|]+\|[^|]+\|[^|]+\|\s+(\S+).*"; package_patch_installed_regex => ".*Installed.*|.*Not Applicable.*"; package_patch_name_regex => "[^|]+\|\s+(\S+).*"; package_patch_version_regex => "[^|]+\|[^|]+\|\s+(\S+).*"; package_name_convention => "$(name)"; package_add_command => "/usr/bin/zypper --non-interactive install --auto-agree-with-licenses"; package_delete_command => "/usr/bin/zypper --non-interactive remove --force-resolution"; package_update_command => "/usr/bin/zypper --non-interactive update"; package_patch_command => "/usr/bin/zypper --non-interactive patch$"; # $ means no args package_verify_command => "/usr/bin/zypper --non-interactive verify$"; } and here's a snippet of what I see in the verbose output... cf3 ......................................................... cf3 Promise handle: suse_package_add cf3 Promise made by: automake cf3 cf3 Comment: Add extra suse packages cf3 ......................................................... cf3 cf3 ?? Already have a package list for this manager cf3 -> Package version was not specified cf3 -> Looking for (automake,*,*) cf3 !! Unsatisfied constraints in promise (automake,*,*) cf3 -> Looking for (automake,*,*) cf3 !! Unsatisfied constraints in promise (automake,*,*) cf3 -> 0 package(s) matching the name "automake" already installed cf3 -> 0 package(s) match the promise body's criteria fully cf3 -> Package promises to refer to itself as "automake" to the manager cf3 -> Package version seems to match criteria cf3 -> Schedule package for addition cf3 cf3 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cf3 Offering these package-promise suggestions to the managers cf3 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cf3 -> Deletion schedule... cf3 -> Addition schedule... cf3 Execute scheduled package addition cf3 Command prefix: /usr/bin/zypper --non-interactive install --auto-agree-with-licenses cf3 Executing /usr/bin/zypper --non-interactive install --auto-agree-with-... cf3 Q:zypper --non-interac ...:Loading repository data... cf3 Q:zypper --non-interac ...:Reading installed packages... cf3 Q:zypper --non-interac ...:Package 'hplip-hpcups' not found. cf3 Q:zypper --non-interac ...:'libstdc++45-32bit' providing 'libstdc++*-32bit' is already installed. cf3 Q:zypper --non-interac ...:No update candidate for 'libstdc++45-32bit-4.5.1_20101208-9.8.x86_64'. The highest available version is already installed. cf3 Q:zypper --non-interac ...:No update candidate for 'perl-XML-LibXML-1.70-10.1.x86_64'. The highest available version is already installed. cf3 Q:zypper --non-interac ...: cf3 Bulk package schedule execution ok for yast2-autofs (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for xemacs-el (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for python-wxWidgets (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for perl* (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for pidgin (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for make (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for libstdc++*-32bit (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for ktimetracker (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for hplip-hpcups (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for glibc-devel-32bit (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for gcc*-32bit (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for gcc-c++ (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for gcc (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for cmake-gui (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for cmake (outcome cannot be promised by cf-agent) cf3 Bulk package schedule execution ok for automake (outcome cannot be promised by cf-agent) cf3 -> Update schedule... cf3 -> Patch schedule... cf3 -> Verify schedule... So my guess is that the "Bulk package schedule execution ok" lines indicate a package should be installed, but nothing seems to happen! Any ideas anyone? Thanks! _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine