gbuild: Allow disabling fetch of modified caches with `--cache-read-only` option

redo121
Luke Dashjr 9 years ago
parent c834f371bb
commit 9d46e26c2e

@ -156,6 +156,9 @@ OptionParser.new do |opts|
opts.on("-u PAIRS", "--url PAIRS", "comma separated list of DIRECTORY=URL pairs") do |v|
@options[:url] = v
end
opts.on("--cache-read-only", "only use existing cache files, do not update them") do |v|
@options[:cache_ro] = v
end
end.parse!
if !ENV["USE_LXC"] and !File.exist?("/dev/kvm")
@ -259,11 +262,13 @@ suites.each do |suite|
info "Grabbing results"
system! "copy-from-target #{@quiet_flag} out #{build_dir}"
unless @options[:cache_ro]
if enable_cache
info "Grabbing cache"
system! "copy-from-target #{@quiet_flag} cache/#{package_name}/ #{cache_dir}"
system! "copy-from-target #{@quiet_flag} cache/common/ #{cache_dir}"
end
end
base_manifest = File.read("var/base-#{suite}-#{arch}.manifest")
base_manifests["#{suite}-#{arch}"] = base_manifest
end

Loading…
Cancel
Save