MCPcopy Create free account
hub / github.com/apache/arrow / yum_build

Method yum_build

dev/tasks/linux-packages/package-task.rb:476–509  ·  view source on GitHub ↗
(console: false)

Source from the content-addressed store, hash-verified

474 end
475
476 def yum_build(console: false)
477 tmp_dir = "#{yum_dir}/tmp"
478 rm_rf(tmp_dir)
479 mkdir_p(tmp_dir)
480 cp(rpm_archive_name,
481 File.join(tmp_dir, rpm_archive_name))
482
483 env_sh = "#{yum_dir}/env.sh"
484 File.open(env_sh, "w") do |file|
485 file.puts(<<-ENV)
486SOURCE_ARCHIVE=#{rpm_archive_name}
487PACKAGE=#{@rpm_package}
488VERSION=#{@rpm_version}
489RELEASE=#{@rpm_release}
490 ENV
491 end
492
493 spec = "#{tmp_dir}/#{@rpm_package}.spec"
494 spec_in_data = File.read(yum_spec_in_path, encoding: "UTF-8")
495 spec_data = substitute_content(spec_in_data) do |key, matched|
496 yum_expand_variable(key) || matched
497 end
498 File.open(spec, "w") do |spec_file|
499 spec_file.print(spec_data)
500 end
501
502 yum_targets.each do |target|
503 cd(yum_dir) do
504 distribution, version, architecture = split_target(target)
505 os = "#{distribution}-#{version}"
506 docker_run(os, architecture, console: console)
507 end
508 end
509 end
510
511 def define_yum_task
512 namespace :yum do

Callers

nothing calls this directly

Calls 6

docker_runFunction · 0.85
printMethod · 0.80
joinMethod · 0.45
openMethod · 0.45
readMethod · 0.45
eachMethod · 0.45

Tested by

no test coverage detected