aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-02-20 01:40:02 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-02-20 01:40:02 +0000
commitb8d876fc8e8ce96edef842257998d0570566205e (patch)
treeec8ceae4c54f37e92efa93bbb66a9a0b22b513c0
parentDo not introduce our own false no-herd. (diff)
downloadrbot-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.rb5
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