mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Fix crew buildessential dependency resolution (#5662)
This commit is contained in:
23
bin/crew
23
bin/crew
@@ -511,7 +511,7 @@ def upgrade
|
||||
puts "#{@pkg.name} is already up to date.".lightgreen
|
||||
end
|
||||
else
|
||||
# Make a installed packages list belong to the dependency order
|
||||
# Make an installed packages list belong to the dependency order
|
||||
dependencies = []
|
||||
@device[:installed_packages].each do |package|
|
||||
# skip package if it is dependent other packages previously checked
|
||||
@@ -520,6 +520,7 @@ def upgrade
|
||||
dependencies = [ package[:name] ].concat(dependencies)
|
||||
# expand dependencies and add it to the dependencies list
|
||||
search package[:name], true
|
||||
@dependencies = []
|
||||
exp_dep = expand_dependencies
|
||||
dependencies = exp_dep.concat(dependencies)
|
||||
end
|
||||
@@ -849,17 +850,6 @@ def resolve_dependencies_and_install
|
||||
end
|
||||
|
||||
def expand_dependencies
|
||||
@dependencies = []
|
||||
if @pkg.build_from_source
|
||||
# make sure all buildessential packages are installed
|
||||
pkgname = @pkg.name
|
||||
search 'buildessential', true
|
||||
check_deps = @pkg.dependencies.map {|k, v| k}
|
||||
check_deps.each do |dep|
|
||||
@dependencies << dep unless @device[:installed_packages].include?(dep)
|
||||
end
|
||||
search pkgname, true
|
||||
end
|
||||
def push_dependencies
|
||||
if @pkg.is_binary?(@device[:architecture]) ||
|
||||
(!@pkg.in_upgrade && !@pkg.build_from_source && @device[:installed_packages].any? { |pkg| pkg[:name] == @pkg.name })
|
||||
@@ -884,6 +874,15 @@ end
|
||||
|
||||
def resolve_dependencies
|
||||
abort "Package #{@pkg.name} is not compatible with your device architecture (#{ARCH}) :/".lightred unless @pkg.compatibility.include?('all') or @pkg.compatibility.include?(ARCH)
|
||||
|
||||
@dependencies = []
|
||||
if @pkg.build_from_source
|
||||
# make sure all buildessential packages are installed
|
||||
pkgname = @pkg.name
|
||||
search 'buildessential', true
|
||||
expand_dependencies
|
||||
search pkgname, true
|
||||
end
|
||||
expand_dependencies
|
||||
|
||||
# leave only not installed packages in dependencies
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Defines common constants used in different parts of crew
|
||||
|
||||
CREW_VERSION = '1.8.9'
|
||||
CREW_VERSION = '1.8.10'
|
||||
|
||||
ARCH_ACTUAL = `uname -m`.strip
|
||||
# This helps with virtualized builds on aarch64 machines
|
||||
|
||||
Reference in New Issue
Block a user