diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-02-20 01:40:02 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-02-20 01:40:02 +0000 |
commit | b8d876fc8e8ce96edef842257998d0570566205e (patch) | |
tree | ec8ceae4c54f37e92efa93bbb66a9a0b22b513c0 | |
parent | Do not introduce our own false no-herd. (diff) | |
download | rbot-gentoo-b8d876fc8e8ce96edef842257998d0570566205e.tar.gz rbot-gentoo-b8d876fc8e8ce96edef842257998d0570566205e.tar.bz2 rbot-gentoo-b8d876fc8e8ce96edef842257998d0570566205e.zip |
Handle output that does not contain any herds.
-rw-r--r-- | gentoo-data.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gentoo-data.rb b/gentoo-data.rb index f4e10d1..e1b8800 100644 --- a/gentoo-data.rb +++ b/gentoo-data.rb @@ -82,7 +82,10 @@ class GentooPlugin < Plugin output = f.readlines f.close m.reply "#{output}" - herds = output[0].gsub(/^.* Herd: ([^ ]+) .*$/, '\1').strip.split(/[, ]+/).map { |s| s.strip }.flatten + herds = [] + output[0].gsub!(/(Maintainer:|Description:).*/,'') + mre = /Herd: +([-[:alnum:], ]+) .*/.match(output[0]) + herds = mre[1].strip.split(/[, ]+/).map { |s| s.strip }.flatten if mre and mre[1] herds.each { |h| debug("meta -v calling herd for #{h}") p = params.clone |