Forum: Cfengine Help Subject: Bug found while installing package with multiple architectures (patch submitted in bug tracker) Author: daveseff Link to topic: https://cfengine.com/forum/read.php?3,21755,21755#msg-21755
Bug 584 has been submitted for this. If given a promise to install a package with multiple architectures, If the first architecture already exists then the second does not get properly marked for installation. Example "libxml2" package_policy => "add", package_method => yum, package_architectures => { "x86_64", "i386" }; The issue is that the for loop cycles through the list of given architectures if the first arch is currently installed, then the installed and the matches variables are set to 1. the next pass through the loop these variables are still of value 1 so the next arch produces a false positive. Reinitializing of the variable are needed for proper opetation. Solution: Index: verify_packages.c =================================================================== --- verify_packages.c (revision 1081) +++ verify_packages.c (working copy) @@ -499,6 +499,8 @@ { for (rp = a.packages.package_architectures; rp != NULL; rp=rp->next) { + installed = 0; + matches = 0; CfOut(cf_verbose,""," ... trying listed arch %s\n",rp->item); strncpy(name,pp->promiser,CF_MAXVARSIZE-1); strncpy(version,"*",CF_MAXVARSIZE-1); _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine