Browse Source

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

pull/97/head
Luke Dashjr 5 years ago
parent
commit
9d46e26c2e
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      bin/gbuild

+ 5
- 0
bin/gbuild View File

@@ -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