def find_package_versions(ref, leaf, location)
      return {} unless ref =~ Lyp::PACKAGE_RE
      ref_package = $1
      version_clause = $2

      matches = find_matching_packages(ref)

      # Raise if no match found and we're at top of the tree
      if matches.empty? && (leaf == tree) && !opts[:ignore_missing]
        msg = "Missing package dependency #{ref} in %sYou can install any missing packages by running:\n\n  lyp resolve #{@user_file}"
        error(msg, location)
      end

      matches.each do |p, package_leaf|
        if package_leaf.path
          queue_file_for_processing(package_leaf.path, package_leaf)
        end
      end

      # Setup up dependency leaf
      leaf.add_dependency(ref_package, DependencySpec.new(ref, matches, location))
    end
def find_package_versions(ref, leaf, location)
      return {} unless ref =~ Lyp::PACKAGE_RE
      ref_package = $1
      version_clause = $2

      matches = find_matching_packages(ref)

      # Raise if no match found and we're at top of the tree
      if matches.empty? && (leaf == tree) && !opts[:ignore_missing]
        msg = "Missing package dependency #{ref} in %sYou can install any missing packages by running:\n\n  lyp resolve #{@user_file}"
        error(msg, location)
      end

      matches.each do |p, package_leaf|
        if package_leaf.path
          queue_file_for_processing(package_leaf.path, package_leaf)
        end
      end

      # Setup up dependency leaf
      leaf.add_dependency(ref_package, DependencySpec.new(ref, matches, location))
    end
Find available packaging matching the package specifier, and queue them for
 processing any include files or transitive dependencies.