Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS PE tarballs include arch now #1747

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/beaker/host/mac/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,15 @@ def pe_puppet_agent_promoted_package_info( puppet_collection = nil, opts = {} )

variant, version, arch, codename = self['platform'].to_array
release_file = "/repos/apple/#{version}/#{puppet_collection}/#{arch}/puppet-agent-*"
download_file = "puppet-agent-#{variant}-#{version}.tar.gz"

# macOS puppet-agent tarballs haven't always included arch
agent_version = opts[:puppet_agent_version]
download_file = if agent_version && (agent_version.to_f < 6.28 || agent_version.to_f < 7.18)
Copy link
Contributor Author

@joshcooper joshcooper Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, this method is only ever called from beaker-pe and puppet_agent_version is always passed as an option. It starts in beaker-pe, where we call get_puppet_agent_version

That method either raises or returns a non-nil value

Then we call install_puppet_agent_pe_promoted_repo_on

That method is implemented in beaker-puppet Not sure why it's in beaker-puppet (!?)

And that calls Beaker::Host#pe_puppet_agent_promoted_package_info which is the method this PR changes.

"puppet-agent-#{variant}-#{version}.tar.gz"
else
"puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
end

return '', release_file, download_file
end

Expand Down