Commit 767fa555 authored by satmandu's avatar satmandu Committed by GitHub

crew: Run ldconfig on install; Adjust where reinstall removes package to be reinstalled. (#4538)

* ldconfig  on install; move reinstall remove

Run ldconfig after package installs so apps don't complain about missing just installed libraries. Also, do reinstalls as part of the upgrade path so that package remove happens after the package to be reinstalled has been downloaded. This fixes upgrades on curl (or its dependencies) erroring out on being unable to download the new package using curl.

* bump version
parent 91404d2b
...@@ -808,7 +808,7 @@ def install ...@@ -808,7 +808,7 @@ def install
# remove it just before the file copy # remove it just before the file copy
if @pkg.in_upgrade if @pkg.in_upgrade
puts "Removing since upgrade..." puts "Removing since upgrade or reinstall..."
remove @pkg.name remove @pkg.name
end end
...@@ -829,6 +829,8 @@ def install ...@@ -829,6 +829,8 @@ def install
output = JSON.parse @device.to_json output = JSON.parse @device.to_json
file.write JSON.pretty_generate(output) file.write JSON.pretty_generate(output)
end end
# Update shared library cache after install is complete.
system "#{CREW_PREFIX}/sbin/ldconfig || true"
end end
def resolve_dependencies_and_build def resolve_dependencies_and_build
...@@ -1031,11 +1033,14 @@ end ...@@ -1031,11 +1033,14 @@ end
def reinstall_command (args) def reinstall_command (args)
args["<name>"].each do |name| args["<name>"].each do |name|
remove name
@pkgName = name @pkgName = name
search @pkgName search @pkgName
@pkg.build_from_source = true if @opt_src or @opt_recursive @pkg.build_from_source = true if @opt_src or @opt_recursive
resolve_dependencies_and_install if @pkgName
@pkg.in_upgrade = true
resolve_dependencies_and_install
@pkg.in_upgrade = false
end
end end
end end
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.5.0' CREW_VERSION = '1.5.1'
ARCH_ACTUAL = `uname -m`.strip ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines # This helps with virtualized builds on aarch64 machines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment