diff options
author | Peter Wilmott <p@p8952.info> | 2015-01-28 10:04:03 +0000 |
---|---|---|
committer | Peter Wilmott <p@p8952.info> | 2015-01-28 10:04:03 +0000 |
commit | b28728adf58c148237dd7a7cbef8a2049f3c1368 (patch) | |
tree | 83c827d23ad3885ddf535397cf7637466a719154 /web/lib | |
parent | Increase pool timeout, add more connections (diff) | |
download | ruby-tinderbox-b28728adf58c148237dd7a7cbef8a2049f3c1368.tar.gz ruby-tinderbox-b28728adf58c148237dd7a7cbef8a2049f3c1368.tar.bz2 ruby-tinderbox-b28728adf58c148237dd7a7cbef8a2049f3c1368.zip |
Clear packages with no targets, or those with full targets
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/repoman.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/web/lib/repoman.rb b/web/lib/repoman.rb index 98756c3..343e4f6 100644 --- a/web/lib/repoman.rb +++ b/web/lib/repoman.rb @@ -6,13 +6,19 @@ def run_repoman(provisioner) target = package[:r20_target] unless package[:r20_target] == 'nil' target = package[:r21_target] unless package[:r21_target] == 'nil' target = package[:r22_target] unless package[:r22_target] == 'nil' - next if target.empty? + if target.empty? + Repoman.where(package_id: package[:identifier]).delete + next + end next_target = '' next_target = 'ruby20' if target == 'ruby19' next_target = 'ruby21' if target == 'ruby20' next_target = 'ruby22' if target == 'ruby21' - next if next_target.empty? + if next_target.empty? + Repoman.where(package_id: package[:identifier]).delete + next + end category = package[:category] name = package[:name] @@ -24,6 +30,7 @@ def run_repoman(provisioner) packages = "'" + packages.join("' '") + "'" + exit begin vagrant_path = File.dirname(File.dirname(File.expand_path(File.dirname(__FILE__)))) vagrant = Vagrant_Rbapi.new(vagrant_path) |