diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-12-15 11:52:49 -0500 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-12-15 11:53:37 -0500 |
commit | cbb7f144560c05073914c77e26c8c5fdb8d8c990 (patch) | |
tree | a12bd184d5c325c944eaf5e1ff792977f247a767 | |
parent | d94e3ebf1adfd83a356f015c1d56122e601e83c0 (diff) | |
download | upstate-cbb7f144560c05073914c77e26c8c5fdb8d8c990.tar.gz upstate-cbb7f144560c05073914c77e26c8c5fdb8d8c990.tar.xz upstate-cbb7f144560c05073914c77e26c8c5fdb8d8c990.zip |
Add or groups to hold provides
You can now specify hold provisions which read "One of (a,b,c)"
-rw-r--r-- | state.rb | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -152,6 +152,17 @@ class State @holds = Set.new [hold] @hold_params = {} self.class.hold_provides.each do |x| + if x.is_a? Array + worked = false + x.each do |y| + hold.params[y] or next + @hold_params[y] = hold.params[y] + worked = true + end + worked or raise AmbiguousRequest, "None of #{x.join(', ')} defined" + next + end + hold.params[x] or raise AmbiguousRequest, "#{x} undefined" @hold_params[x] = hold.params[x] end |