Skip to content

Commit

Permalink
Fixes to portfolio after merge of big ugly patch and "do" file bugs w…
Browse files Browse the repository at this point in the history
…hen running in a container or avoiding using a container for clean.
  • Loading branch information
james-ball-qualcomm committed Dec 18, 2024
1 parent 3f5a54b commit bc97374
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
14 changes: 6 additions & 8 deletions do
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash

ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
if [ -v DEVCONTAINER_ENV ]; then
BUNDLE=bundle
else
source $ROOT/bin/setup
fi

if [ "$1" == "clean" ]; then
${ROOT}/bin/clean
else
# really long way of invoking rake, but renamed to 'do'
$BUNDLE exec --gemfile $ROOT/Gemfile ruby -r rake -e "Rake.application.init('do');Rake.application.load_rakefile;Rake.application.top_level" -- $@
exit $?
fi

source $ROOT/bin/setup

# really long way of invoking rake, but renamed to 'do'
$BUNDLE exec --gemfile $ROOT/Gemfile ruby -r rake -e "Rake.application.init('do');Rake.application.load_rakefile;Rake.application.top_level" -- $@
10 changes: 5 additions & 5 deletions lib/arch_obj_models/portfolio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def version_greatest_presence(ext_name, ext_versions)
greatest_presence = nil

in_scope_ext_reqs.each do |ext_req|
if ext_req.satisfied_by?(ext_name, v.version)
if ext_req.satisfied_by?(v)
presence = extension_presence_obj(ext_name)

unless presence.nil?
unless presence.nil?
if greatest_presence.nil?
greatest_presence = presence
elsif presence > greatest_presence
Expand Down Expand Up @@ -127,11 +127,11 @@ def in_scope_ext_reqs(desired_presence = nil)
@data["extensions"]&.each do |ext_name, ext_data|
next if ext_name[0] == "$"

# Does extension even exist?
# Does extension even exist?
# If not, don't raise an error right away so we can find all of the missing extensions and report them all.
ext = arch_def.extension(ext_name)
ext = cfg_arch.extension(ext_name)
if ext.nil?
puts "Extension #{ext_name} for #{name} not found in database"
puts "Extension #{ext_name} for #{name} not found in database"
missing_ext = true
end

Expand Down

0 comments on commit bc97374

Please sign in to comment.