aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Amoss <ackle@gentoo.org>2017-03-25 14:54:38 -0400
committerYury German <blueknight@gentoo.org>2017-03-27 00:05:44 -0400
commit5c3aea2bc23fb9e48599ee33e947082aec4c114f (patch)
tree0461bd0e03c3b44af27d70db1dbac7a05e3ea115
parentXML format: Revert using count="" in <revised/> (diff)
downloadglsamaker-5c3aea2bc23fb9e48599ee33e947082aec4c114f.tar.gz
glsamaker-5c3aea2bc23fb9e48599ee33e947082aec4c114f.tar.bz2
glsamaker-5c3aea2bc23fb9e48599ee33e947082aec4c114f.zip
herds.xml is gone, but CVETool moves on2.1
Signed-off-by: Yury German <blueknight@gentoo.org>
-rw-r--r--lib/glsamaker/portage.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/glsamaker/portage.rb b/lib/glsamaker/portage.rb
index aeb0a19..bd9e6db 100644
--- a/lib/glsamaker/portage.rb
+++ b/lib/glsamaker/portage.rb
@@ -113,20 +113,19 @@ module Glsamaker
x = Nokogiri::XML(File.read(File.join(portdir, atom, 'metadata.xml')))
- herds = []
maintainers = []
- x.xpath('/pkgmetadata/herd').each {|h| herds << h.content }
x.xpath('/pkgmetadata/maintainer/email').each {|m| maintainers << m.content }
-
- unless herds.first == "no-herd"
- herds_xml = Nokogiri::XML(File.read(File.join(portdir, 'metadata', 'herds.xml')))
- herds_email = herds.map {|h| herds_xml.xpath("/herds/herd/name[text()='#{h}']").first.parent.xpath("./email").first.content }
-
- (maintainers + herds_email).uniq
- else
- maintainers
+
+ if maintainers.empty?
+ if x.path('/pkgmetadata/comment()').text.include? "maintainer-needed"
+ maintainers = "maintainer-needed@gentoo.org"
+ else
+ raise(ArgumentError, "No Maintainer Information Found")
+ end
end
+
+ maintainers
end
# Returns information from the portage metadata cache