-
Notifications
You must be signed in to change notification settings - Fork 250
feat(linux): network isolated cluster install package via cached first #8292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4ca773a
63233cd
cba794e
7f35503
a48b02e
2781627
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -328,6 +328,55 @@ installPkgWithAptGet() { | |||||
| rm -rf ${downloadDir} | ||||||
| } | ||||||
|
|
||||||
| installPackageFromCache() { | ||||||
| local packageName="${1:-}" | ||||||
| local packageVersion="${2}" | ||||||
| local downloadDir="/opt/${packageName}/downloads" | ||||||
| local debFile="" | ||||||
| local aptPlanOutput="" | ||||||
| local plannedPkg="" | ||||||
| local hasAdditionalDependencies="false" | ||||||
|
|
||||||
| echo "installing ${packageName} version ${packageVersion} (cache only)" | ||||||
|
|
||||||
| debFile=$(ls "${downloadDir}" | grep "${packageName}" | grep "${packageVersion}" | sort -V | tail -n 1) || debFile="" | ||||||
|
fseldow marked this conversation as resolved.
fseldow marked this conversation as resolved.
fseldow marked this conversation as resolved.
|
||||||
| if [ -z "${debFile}" ]; then | ||||||
| echo "Failed to locate cached ${packageName} deb for version ${packageVersion}" | ||||||
| return 1 | ||||||
| fi | ||||||
|
fseldow marked this conversation as resolved.
|
||||||
|
|
||||||
| debFile="${downloadDir}/${debFile}" | ||||||
|
|
||||||
| # Simulate install first to detect whether apt would pull additional dependencies. | ||||||
| aptPlanOutput=$(apt-get -s install "${debFile}" 2>&1 || true) | ||||||
| if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends:|unable to correct problems|but it is not installable"; then | ||||||
|
||||||
| if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends:|unable to correct problems|but it is not installable"; then | |
| if echo "${aptPlanOutput}" | grep -Eqi "unmet dependencies|depends: .* but it is not installable|depends: .* but it is not going to be installed|unable to correct problems"; then |
Uh oh!
There was an error while loading. Please reload this page.