Commit 4e7304f6 authored by Ed Reel's avatar Ed Reel Committed by Chris Thurber

Update dependency checks in crew (#3137)

parent b5aad973
...@@ -653,21 +653,19 @@ def expand_dependencies ...@@ -653,21 +653,19 @@ def expand_dependencies
end end
end end
push_dependencies push_dependencies
# resolve_dependencies needs expand_dependencies to return @dependencies
return @dependencies
end end
def resolve_dependencies def resolve_dependencies
dependencies = expand_dependencies expand_dependencies
# leave only not installed packages in dependencies # leave only not installed packages in dependencies
dependencies.select! {|name| @device[:installed_packages].none? {|pkg| pkg[:name] == name}} @dependencies.select! {|name| @device[:installed_packages].none? {|pkg| pkg[:name] == name}}
return if dependencies.empty? return if @dependencies.empty?
puts "The following packages also need to be installed: " puts "The following packages also need to be installed: "
dependencies.each do |dep| @dependencies.each do |dep|
print dep + " " print dep + " "
end end
...@@ -686,7 +684,7 @@ def resolve_dependencies ...@@ -686,7 +684,7 @@ def resolve_dependencies
end end
if proceed if proceed
dependencies.each do |dep| @dependencies.each do |dep|
search dep search dep
install install
end end
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.1.2' CREW_VERSION = '1.2.0'
ARCH = `uname -m`.strip ARCH = `uname -m`.strip
ARCH_LIB = if ARCH == 'x86_64' then 'lib64' else 'lib' end ARCH_LIB = if ARCH == 'x86_64' then 'lib64' else 'lib' end
......
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