Add ability to install dependencies during package update
Add ability to install new packages during package update, which
come as new dependency for updated package.
Change-Id: I84f249f5ecb997ede5f980871b78d43fb817e516
Related-Prod: PROD-33565
diff --git a/update-package.groovy b/update-package.groovy
index 851c376..14c2056 100644
--- a/update-package.groovy
+++ b/update-package.groovy
@@ -54,10 +54,14 @@
common.infoMsg("Listing all the packages that have a new update available on nodes: ${targetLiveAll}")
salt.runSaltProcessStep(pepperEnv, targetLiveAll, 'pkg.list_upgrades', [], batch_size, true)
if (TARGET_PACKAGES != '' && TARGET_PACKAGES != '*') {
- common.warningMsg("Note that only the \"${TARGET_PACKAGES}\" would be installed from the above list of available updates on the ${targetLiveAll}")
+ if (ALLOW_DEPENDENCY_UPDATE.toBoolean()) {
+ common.warningMsg("Note that the \"${TARGET_PACKAGES}\" and it new dependencies would be installed from the above list of available updates on the ${targetLiveAll}")
+ } else {
+ common.warningMsg("Note that only the \"${TARGET_PACKAGES}\" would be installed from the above list of available updates on the ${targetLiveAll}")
+ commandKwargs = ['only_upgrade': 'true']
+ }
command = "pkg.install"
packages = TARGET_PACKAGES.tokenize(' ')
- commandKwargs = ['only_upgrade': 'true']
}
}