adjust recursive build dep logic (#7695)

* adjust recursive build dep logic

* adjust logic

* adjust logic

* adjust logic

* cleanup
This commit is contained in:
Satadru Pramanik
2022-11-29 19:05:52 -05:00
committed by GitHub
parent 8dc8bc2687
commit 00f4b755bb
2 changed files with 6 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Defines common constants used in different parts of crew
CREW_VERSION = '1.28.4'
CREW_VERSION = '1.28.5'
# kernel architecture
KERN_ARCH = `uname -m`.chomp

View File

@@ -41,6 +41,8 @@ class Package
pkgObj = const_get(className)
pkgObj.name = pkgName
@crew_current_package = @crew_current_package.nil? ? pkgObj.name : @crew_current_package
return pkgObj
end
@@ -91,8 +93,9 @@ class Package
# parse dependencies recursively
expandedDeps = deps.uniq.map do |dep, depTags|
# check build dependencies only if building from source is needed/specified
next unless (include_build_deps == true) || \
((include_build_deps == 'auto') && is_source) || \
# Do not recursively find :build based build dependencies.
next unless (include_build_deps == true && @crew_current_package == pkgObj.name) || \
((include_build_deps == 'auto') && is_source && @crew_current_package == pkgObj.name) || \
!depTags.include?(:build)
# overwrite tags if parent dependency is a build dependency