* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-05-31 15:01 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-05-31 15:01 UTC (permalink / raw
To: gentoo-commits
commit: 56d6a82c8ffb9006e824352127909f316a40b0a8
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue May 31 15:01:28 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue May 31 15:01:28 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=56d6a82c
Switch to HTTPS.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 5782ff5..2d651b3 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -27,8 +27,8 @@
# end
#end
-#VALID_PACKAGE_SRC = "http://tinderbox.dev.gentoo.org/misc/qsearch.txt"
-#GLSA_SRC = "http://www.gentoo.org/security/en/glsa/glsa-@GLSA_ID@.xml?passthru=1"
+#VALID_PACKAGE_SRC = "https://tinderbox.dev.gentoo.org/misc/qsearch.txt"
+#GLSA_SRC = "https://www.gentoo.org/security/en/glsa/glsa-@GLSA_ID@.xml?passthru=1"
VALID_PACKAGE_SRC = "/dev/shm/qsearch.txt"
GLSA_SRC = "#{ENV['PORTDIR']}/metadata/glsa/glsa-@GLSA_ID@.xml"
PROJECTS_SRC = 'https://api.gentoo.org/metastructure/projects.xml'
@@ -133,7 +133,7 @@ class GentooPlugin < Plugin
def devaway(m, params)
dev = params[:dev].downcase
- res = @bot.httputil.get("http://dev.gentoo.org/devaway/index-csv.php?who=#{dev}")
+ res = @bot.httputil.get("https://dev.gentoo.org/devaway/index-csv.php?who=#{dev}")
if res.length > 0 then
m.reply "#{dev}: #{res}"
else
@@ -212,8 +212,8 @@ class GentooPlugin < Plugin
now = Time.now.tv_sec
unless @@cached['alias'] and @@cached['alias'][0] > now-600
#m.reply "Fetch #{@@cached['alias'][0]} > #{now-600}"
- #res = @bot.httputil.get('http://dev.gentoo.org/~solar/.alias')
- res = @bot.httputil.get('http://dev.gentoo.org/.alias.cache')
+ #res = @bot.httputil.get('https://dev.gentoo.org/~solar/.alias')
+ res = @bot.httputil.get('https://dev.gentoo.org/.alias.cache')
alias_hash = {}
for line in res
split_line = line.split(' = ')
@@ -333,15 +333,15 @@ class GentooPlugin < Plugin
end
def ddep(m, params)
- depcommon(m, 'DEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/dindex/', params)
+ depcommon(m, 'DEPEND', 'https://qa-reports.gentoo.org/output/genrdeps/dindex/', params)
end
def pdep(m, params)
- depcommon(m, 'PDEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/pindex/', params)
+ depcommon(m, 'PDEPEND', 'https://qa-reports.gentoo.org/output/genrdeps/pindex/', params)
end
def rdep(m, params)
- depcommon(m, 'RDEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/rindex/', params)
+ depcommon(m, 'RDEPEND', 'https://qa-reports.gentoo.org/output/genrdeps/rindex/', params)
end
def earch(m, params)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-11-22 4:25 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-11-22 4:25 UTC (permalink / raw
To: gentoo-commits
commit: 1754b6bf47364d27c67d95fd3f9a93955d0de138
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 04:19:18 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 04:19:18 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=1754b6bf
!support: allow optional "GLSA " prefix.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index f536e44..f0aa5f0 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -229,6 +229,7 @@ class GentooPlugin < Plugin
end
def glsa(m, params)
+ id = params[:glsa_id].gsub(/^(GLSA *)?/i,'')
source = GLSA_SRC.sub('@GLSA_ID@', params[:glsa_id])
res = fetch_file_or_url(source)
if res
@@ -402,7 +403,7 @@ plugin.default_auth( 'view', true )
REGEX_CP = /^(?:[-[:alnum:]]+\/)?[-+_[:alnum:]]+$/
REGEX_DEV = /^[-._[:alnum:]]+$/
REGEX_PROJECT = /^[-_@.[:alnum:]]+$/
-REGEX_GLSA = /^[-1234567890]+$/
+REGEX_GLSA = /^(GLSA ?)?[-1234567890]+$/i
plugin.map 'meta -v :pkg',
:requirements => {
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-11-22 4:25 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-11-22 4:25 UTC (permalink / raw
To: gentoo-commits
commit: 3fc2db7f78e8a6887a0d1bf944c0b6615358fe72
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 04:23:55 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 04:23:55 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=3fc2db7f
better formatting for help.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index f0aa5f0..9e7fe34 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -363,8 +363,9 @@ class GentooPlugin < Plugin
m.reply "#{cp} #{output.join(' ')}"
end
+ @@commands = %w(meta changelog devaway proj expn glsa earch rdep ddep pdep)
@@help_gentoo = {
- "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}proj#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
+ "gentoo" => "Available commands: " + @@commands.map { |s| "#{Bold}#{s}#{Bold}" }.join(", ")
"meta" => [
"meta #{Bold}[cat/]package#{Bold} : Print metadata for the given package",
"meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the maintaining projects.",
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-11-22 4:17 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-11-22 4:17 UTC (permalink / raw
To: gentoo-commits
commit: 22417b13f9a19ec1172bac1dcb2d9a0916416c29
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 04:17:14 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 04:17:14 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=22417b13
bug#423207: support devs with periods in nick.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 57cf6e6..f536e44 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -400,7 +400,7 @@ plugin.default_auth( 'modify', false )
plugin.default_auth( 'view', true )
REGEX_CP = /^(?:[-[:alnum:]]+\/)?[-+_[:alnum:]]+$/
-REGEX_DEV = /^[-_[:alnum:]]+$/
+REGEX_DEV = /^[-._[:alnum:]]+$/
REGEX_PROJECT = /^[-_@.[:alnum:]]+$/
REGEX_GLSA = /^[-1234567890]+$/
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-11-22 4:11 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-11-22 4:11 UTC (permalink / raw
To: gentoo-commits
commit: 0d704e295f5beabe1fc33d6e3777f4006a304678
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 04:11:28 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 04:11:37 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=0d704e29
expn: fix split out output per bug #600388
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index e37d376..57cf6e6 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -215,7 +215,7 @@ class GentooPlugin < Plugin
#res = @bot.httputil.get('https://dev.gentoo.org/~solar/.alias')
res = @bot.httputil.get('https://dev.gentoo.org/.alias.cache')
alias_hash = {}
- for line in res
+ for line in res.split("\n")
split_line = line.split(' = ')
alias_hash[split_line[0]] = split_line[1]
end
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-08-13 18:24 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-08-13 18:24 UTC (permalink / raw
To: gentoo-commits
commit: a3c12a104f9293ab3ce9b8cf440f2f0636fb46fa
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 12 16:34:42 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 18:23:45 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=a3c12a10
!*dep: Fix handling errors
gentoo-data.rb | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 792244a..e37d376 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -311,18 +311,20 @@ class GentooPlugin < Plugin
# Watch out for network problems
begin
- packages = @bot.httputil.get(url+cp)
+ resp = @bot.httputil.get_response(url+cp)
+ if Net::HTTPNotFound === resp
+ packages = ''
+ elsif not Net::HTTPOK === resp
+ m.reply "HTTP error: #{resp}"
+ return
+ else
+ packages = resp.body.split("\n")
+ end
rescue ::Exception => e
- m.reply e.message
+ m.reply "Error: #{e.message}"
return
end
- # 404 error => nil response
- packages = '' if packages.nil?
-
- # Only then can we split it
- packages = packages.split("\n")
-
if packages.length == 0
m.reply "No packages have a reverse #{type} on #{cp}."
elsif packages.join(' ').length > 400
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-06-15 3:13 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-06-15 3:13 UTC (permalink / raw
To: gentoo-commits
commit: 39c34e113636135e7ec76dee90168d355b29c7b7
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 03:13:28 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 03:13:28 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=39c34e11
!meta -v: fix project expansion.
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=585982
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 2d651b3..792244a 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -114,7 +114,7 @@ class GentooPlugin < Plugin
meta_print(m, pkg)
pkg['maintainers'].each { |maint|
- return if maint['type'] != 'project'
+ next if maint['type'] != 'project'
debug("meta -v calling proj for #{maint['email']}")
p = params.clone
p[:project] = maint['email']
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 560a65046a8d83fed0e87f577efe5247b5da233f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:35:17 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:45:11 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=560a6504
!meta -v: Support project expansion
gentoo-data.rb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 49c1211..512422f 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -116,6 +116,13 @@ class GentooPlugin < Plugin
return if pkg.nil?
meta_print(m, pkg)
+ pkg['maintainers'].each { |maint|
+ return if maint['type'] != 'project'
+ debug("meta -v calling proj for #{maint['email']}")
+ p = params.clone
+ p[:project] = maint['email']
+ project(m, p)
+ }
pkg['herds'].each { |h|
debug("meta -v calling herd for #{h}")
p = params.clone
@@ -424,7 +431,7 @@ class GentooPlugin < Plugin
"gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}proj#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
"meta" => [
"meta #{Bold}[cat/]package#{Bold} : Print metadata for the given package",
- "meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the package herds.",
+ "meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the maintaining projects.",
].join("\n"),
"changelog" => "changelog #{Bold}[cat/]package#{Bold} : Produce changelog statistics for a given package",
"devaway" => "devaway #{Bold}devname|list#{Bold} : Print the .away for a developer (if any). Using 'list' shows the developers who are away.",
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 6dbe59e6269ce97942db9617250fc8cddd7ee931
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:46:26 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=6dbe59e6
!herd: Remove
gentoo-data.rb | 71 +---------------------------------------------------------
1 file changed, 1 insertion(+), 70 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 0be1177..5782ff5 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -31,7 +31,6 @@
#GLSA_SRC = "http://www.gentoo.org/security/en/glsa/glsa-@GLSA_ID@.xml?passthru=1"
VALID_PACKAGE_SRC = "/dev/shm/qsearch.txt"
GLSA_SRC = "#{ENV['PORTDIR']}/metadata/glsa/glsa-@GLSA_ID@.xml"
-HERDS_SRC = 'https://api.gentoo.org/packages/herds.xml'
PROJECTS_SRC = 'https://api.gentoo.org/metastructure/projects.xml'
PGO_RESOLVE_URI = 'https://packages.gentoo.org/packages/resolve.json?atom=%s'
PGO_DATA_URI = 'https://packages.gentoo.org/packages/%s.json'
@@ -145,67 +144,9 @@ class GentooPlugin < Plugin
def initialize
super
@@cached = {}
- @@cached['herds'] = [0, nil]
@@cached['projects'] = [0, nil]
@@cached['pkgindex'] = [0, nil]
@@cached['alias'] = [0, nil]
- @@cached['notherds'] = [0, nil]
- end
-
- def herd(m, params)
- now = Time.now.tv_sec
- unless @@cached['herds'] and @@cached['herds'][0] > now-600
- #m.reply "Fetch #{@@cached['herds'][0]} > #{now-600}"
- res = @bot.httputil.get(HERDS_SRC)
- herds = REXML::Document.new(res)
- @@cached['herds'] = [now, herds]
- else
- #m.reply "Cache #{@@cached['herds'][0]} > #{now-600}"
- herds = @@cached['herds'][1]
- end
-
- unless @@cached['notherds'] and @@cached['notherds'][0] > now-600
- notherds = {}
- File.foreach("#{scriptdir}/not-a-herd.txt") { |line|
- k,v = line.split(/\s+/, 2)
- notherds[k] = v
- }
- if notherds.length > 0
- @@cached['notherds'] = [now, notherds]
- else
- @@cached['notherds'] = [0, nil]
- end
- else
- notherds = @@cached['notherds'][1]
- end
-
- # Parse data
- # xpath queries with REXML appear to be extremely slow, which is why we took the approach below
- herd = nil
- herds.elements[1].each_element { |elem|
- if elem.get_elements('name')[0].text == params[:herd]
- herd = elem
- break
- end }
- if herd
- emails = []
- for maintainer in herd.get_elements("maintainer")
- emails << maintainer.get_elements('email')[0].text.split('@')[0]
- end
- for project in herd.get_elements("maintainingproject")
- res = @bot.httputil.get("http://www.gentoo.org/#{project.text}?passthru=1")
- proj_xml = REXML::Document.new(res)
- for dev in proj_xml.get_elements("/project/dev")
- emails << dev.text
- end
- end
- m.reply "(#{params[:herd]}) #{emails.sort.join(', ')}"
- elsif notherds.has_key?(params[:herd])
- herddata = notherds[params[:herd]]
- m.reply "(#{params[:herd]}) #{herddata}"
- else
- m.reply "No such herd #{params[:herd]}"
- end
end
def project(m, params)
@@ -420,14 +361,13 @@ class GentooPlugin < Plugin
end
@@help_gentoo = {
- "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}proj#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
+ "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}proj#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
"meta" => [
"meta #{Bold}[cat/]package#{Bold} : Print metadata for the given package",
"meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the maintaining projects.",
].join("\n"),
"changelog" => "changelog #{Bold}[cat/]package#{Bold} : Produce changelog statistics for a given package",
"devaway" => "devaway #{Bold}devname|list#{Bold} : Print the .away for a developer (if any). Using 'list' shows the developers who are away.",
- "herd" => "herd #{Bold}herdname#{Bold} : Print the members of a herd.",
"proj" => "proj #{Bold}project-email#{Bold} : Print the members of a project.",
"expn" => "expn #{Bold}alias#{Bold} : Print the addresses on a Gentoo mail alias.",
"glsa" => [
@@ -459,7 +399,6 @@ plugin.default_auth( 'view', true )
REGEX_CP = /^(?:[-[:alnum:]]+\/)?[-+_[:alnum:]]+$/
REGEX_DEV = /^[-_[:alnum:]]+$/
-REGEX_HERD = /^[-_[:alnum:]]+$/
REGEX_PROJECT = /^[-_@.[:alnum:]]+$/
REGEX_GLSA = /^[-1234567890]+$/
@@ -510,14 +449,6 @@ plugin.map 'away :dev',
:thread => 'yes',
:auth_path => 'view'
-plugin.map 'herd :herd',
- :requirements => {
- :herd => REGEX_HERD,
- },
- :action => 'herd',
- :thread => 'yes',
- :auth_path => 'view'
-
plugin.map 'proj :project',
:requirements => {
:project => REGEX_PROJECT,
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 2984cd6ef0603a7650e2e731fb3ad92909673545
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:36:29 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:45:11 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=2984cd6e
!meta -v: Disable herd expansion
gentoo-data.rb | 6 ------
1 file changed, 6 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 512422f..d99c7c6 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -123,12 +123,6 @@ class GentooPlugin < Plugin
p[:project] = maint['email']
project(m, p)
}
- pkg['herds'].each { |h|
- debug("meta -v calling herd for #{h}")
- p = params.clone
- p[:herd] = h
- herd(m, p)
- }
end
def changelog(m, params)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 23809b63da6f9ccd8385931941d86b4d1f018965
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:38:46 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:45:11 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=23809b63
help: Add proj to command list
gentoo-data.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 0d95650..49c1211 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -421,7 +421,7 @@ class GentooPlugin < Plugin
end
@@help_gentoo = {
- "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
+ "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}proj#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
"meta" => [
"meta #{Bold}[cat/]package#{Bold} : Print metadata for the given package",
"meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the package herds.",
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 2d49aaf8c477f77c5d0d820fffe8bd74088bb9b3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:40:09 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:45:11 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=2d49aaf8
!meta: Stop printing herds
gentoo-data.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index d99c7c6..0be1177 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -89,10 +89,8 @@ class GentooPlugin < Plugin
# TODO: handle description?
maints = pkg['maintainers'].map{|x| x['email'].chomp('@gentoo.org')}.join(', ')
maints = '(none)' if maints.empty?
- herds = pkg['herds'].join(', ')
- herds = '(none)' if herds.empty?
- m.reply "#{pkg['atom']}; herds: #{herds}; maintainers: #{maints}"
+ m.reply "#{pkg['atom']}; maintainers: #{maints}"
end
def meta(m, params)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-27 18:21 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-27 18:21 UTC (permalink / raw
To: gentoo-commits
commit: af11735252f47266fd54b12b9d7a97881f8407e9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 15:34:42 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 15:34:42 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=af117352
Fix handling ambiguous/no match results for packages
gentoo-data.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 1a165c1..0d95650 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -72,6 +72,8 @@ class GentooPlugin < Plugin
else
return pkgs[0]
end
+
+ return nil
end
def pgo_get(m, atom)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-12 19:09 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-12 19:09 UTC (permalink / raw
To: gentoo-commits
commit: fbfaafce172be5fc7d9547ed200e6d22214792a8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 12 14:57:04 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 12 19:08:53 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=fbfaafce
!validpkg: Do queries using packages.gentoo.org
gentoo-data.rb | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 37b606f..b1d9827 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -33,6 +33,7 @@ VALID_PACKAGE_SRC = "/dev/shm/qsearch.txt"
GLSA_SRC = "#{ENV['PORTDIR']}/metadata/glsa/glsa-@GLSA_ID@.xml"
HERDS_SRC = 'https://api.gentoo.org/packages/herds.xml'
PROJECTS_SRC = 'https://api.gentoo.org/metastructure/projects.xml'
+PGO_RESOLVE_URI = 'https://packages.gentoo.org/packages/resolve.json?atom=%s'
class GentooPlugin < Plugin
Config.register Config::StringValue.new('gentoo.scriptdir',
@@ -54,7 +55,24 @@ class GentooPlugin < Plugin
py = '/usr/bin/python' unless py
return py
end
-
+
+ def pgo_resolve(atom)
+ uri = PGO_RESOLVE_URI % [URI.escape(atom, '\W+')]
+ res = @bot.httputil.get(uri)
+ return JSON.parse(res)
+ end
+
+ def pgo_resolve_one(m, atom)
+ pkgs = pgo_resolve(atom)['packages']
+ if pkgs.empty?
+ m.reply "No matching packages for '#{atom}'"
+ elsif pkgs.length > 1
+ m.reply "Ambiguous name '#{atom}'. Possible options: #{pkgs.map{ |x| x['atom'] }.sort.join(' ')}"
+ else
+ return pkgs[0]
+ end
+ end
+
def meta(m, params)
cp = params[:pkg]
cp = validate_package(m, cp)
@@ -68,12 +86,12 @@ class GentooPlugin < Plugin
m.reply "Cannot find metadata for '#{cp}'"
end
end
-
+
def validpkg(m, params)
- icp = params[:pkg]
- cp = validate_package(m, icp)
- return if cp.nil?
- m.reply "#{icp} => #{cp} is valid"
+ atom = params[:pkg]
+ pkg = pgo_resolve_one(m, atom)
+ return if pkg.nil?
+ m.reply "#{atom} => #{pkg['atom']} is valid"
end
def meta_verbose(m, params)
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-12 19:09 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-12 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 199809b60ed580754ebfad7fd77b18ad2369c9a2
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 12 12:29:45 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 12 19:08:53 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=199809b6
!proj: Distinguish between non-existing and empty projects
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=571614
gentoo-data.rb | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index 79c3b34..37b606f 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -208,25 +208,35 @@ class GentooPlugin < Plugin
break
end }
- emails = []
if project
+ emails = []
for maintainer in project.get_elements("member")
emails << maintainer.get_elements('email')[0].text.chomp('@gentoo.org')
end
for subproject in project.get_elements("subproject")
if subproject.attributes["inherit-members"] == "1"
- emails += expand_project_recursively(projects,
+ sub_emails = expand_project_recursively(projects,
subproject.attributes["ref"])
+ if sub_emails.nil?
+ emails << "<#{subproject.attributes["ref"]}>"
+ else
+ emails += sub_emails
+ end
end
end
+ return emails
+ else
+ return nil
end
- return emails
end
emails = expand_project_recursively(projects, req_project)
- unless emails.empty?
- m.reply "(#{req_project}) #{emails.sort.uniq.join(', ')}"
- else
+
+ if emails.nil?
m.reply "No such project: #{req_project}"
+ elsif emails.empty?
+ m.reply "(#{req_project}) [no members]"
+ else
+ m.reply "(#{req_project}) #{emails.sort.uniq.join(', ')}"
end
end
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-12 19:09 Michał Górny
0 siblings, 0 replies; 20+ messages in thread
From: Michał Górny @ 2016-01-12 19:09 UTC (permalink / raw
To: gentoo-commits
commit: b25e26fd9f0dc496f5a10eeaf7f921b84e2cd873
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 12 15:24:39 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 12 19:08:53 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=b25e26fd
!meta: Do queries using packages.gentoo.org
gentoo-data.rb | 54 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index b1d9827..1a165c1 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -34,6 +34,7 @@ GLSA_SRC = "#{ENV['PORTDIR']}/metadata/glsa/glsa-@GLSA_ID@.xml"
HERDS_SRC = 'https://api.gentoo.org/packages/herds.xml'
PROJECTS_SRC = 'https://api.gentoo.org/metastructure/projects.xml'
PGO_RESOLVE_URI = 'https://packages.gentoo.org/packages/resolve.json?atom=%s'
+PGO_DATA_URI = 'https://packages.gentoo.org/packages/%s.json'
class GentooPlugin < Plugin
Config.register Config::StringValue.new('gentoo.scriptdir',
@@ -73,18 +74,31 @@ class GentooPlugin < Plugin
end
end
+ def pgo_get(m, atom)
+ pkg = pgo_resolve_one(m, atom)
+ return if pkg.nil?
+
+ uri = PGO_DATA_URI % [pkg['atom']]
+ res = @bot.httputil.get(uri)
+ return JSON.parse(res)
+ end
+
+ def meta_print(m, pkg)
+ # TODO: handle description?
+ maints = pkg['maintainers'].map{|x| x['email'].chomp('@gentoo.org')}.join(', ')
+ maints = '(none)' if maints.empty?
+ herds = pkg['herds'].join(', ')
+ herds = '(none)' if herds.empty?
+
+ m.reply "#{pkg['atom']}; herds: #{herds}; maintainers: #{maints}"
+ end
+
def meta(m, params)
- cp = params[:pkg]
- cp = validate_package(m, cp)
- return if cp.nil?
- f = IO.popen("#{python} #{scriptdir}/metadata.py '#{cp}'")
- r = f.readlines
- f.close
- if r.length > 0
- m.reply "#{r}"
- else
- m.reply "Cannot find metadata for '#{cp}'"
- end
+ atom = params[:pkg]
+ pkg = pgo_get(m, atom)
+ return if pkg.nil?
+
+ meta_print(m, pkg)
end
def validpkg(m, params)
@@ -95,18 +109,12 @@ class GentooPlugin < Plugin
end
def meta_verbose(m, params)
- cp = params[:pkg]
- cp = validate_package(m, cp)
- return if cp.nil?
- f = IO.popen("#{python} #{scriptdir}/metadata.py '#{cp}'")
- output = f.readlines
- f.close
- m.reply "#{output}"
- 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|
+ atom = params[:pkg]
+ pkg = pgo_get(m, atom)
+ return if pkg.nil?
+
+ meta_print(m, pkg)
+ pkg['herds'].each { |h|
debug("meta -v calling herd for #{h}")
p = params.clone
p[:herd] = h
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2016-01-11 16:25 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2016-01-11 16:25 UTC (permalink / raw
To: gentoo-commits
commit: eda77830a3201e013e95e747b81e5b0ea0b5ecc2
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 11 16:25:12 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 11 16:25:18 2016 +0000
URL: https://gitweb.gentoo.org/proj/rbot-gentoo.git/commit/?id=eda77830
Add !proj to obtain project members from projects.xml
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
gentoo-data.rb | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index bcd245a..79c3b34 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -32,6 +32,7 @@
VALID_PACKAGE_SRC = "/dev/shm/qsearch.txt"
GLSA_SRC = "#{ENV['PORTDIR']}/metadata/glsa/glsa-@GLSA_ID@.xml"
HERDS_SRC = 'https://api.gentoo.org/packages/herds.xml'
+PROJECTS_SRC = 'https://api.gentoo.org/metastructure/projects.xml'
class GentooPlugin < Plugin
Config.register Config::StringValue.new('gentoo.scriptdir',
@@ -118,6 +119,7 @@ class GentooPlugin < Plugin
super
@@cached = {}
@@cached['herds'] = [0, nil]
+ @@cached['projects'] = [0, nil]
@@cached['pkgindex'] = [0, nil]
@@cached['alias'] = [0, nil]
@@cached['notherds'] = [0, nil]
@@ -179,6 +181,55 @@ class GentooPlugin < Plugin
end
end
+ def project(m, params)
+ now = Time.now.tv_sec
+ unless @@cached['projects'] and @@cached['projects'][0] > now-600
+ #m.reply "Fetch #{@@cached['projects'][0]} > #{now-600}"
+ res = @bot.httputil.get(PROJECTS_SRC)
+ projects = REXML::Document.new(res)
+ @@cached['projects'] = [now, projects]
+ else
+ #m.reply "Cache #{@@cached['projects'][0]} > #{now-600}"
+ projects = @@cached['projects'][1]
+ end
+
+ req_project = params[:project]
+ unless req_project.include?('@')
+ req_project += '@gentoo.org'
+ end
+
+ # Parse data
+ # xpath queries with REXML appear to be extremely slow, which is why we took the approach below
+ def expand_project_recursively(projects, proj_email)
+ project = nil
+ projects.elements[1].each_element { |elem|
+ if elem.get_elements('email')[0].text == proj_email
+ project = elem
+ break
+ end }
+
+ emails = []
+ if project
+ for maintainer in project.get_elements("member")
+ emails << maintainer.get_elements('email')[0].text.chomp('@gentoo.org')
+ end
+ for subproject in project.get_elements("subproject")
+ if subproject.attributes["inherit-members"] == "1"
+ emails += expand_project_recursively(projects,
+ subproject.attributes["ref"])
+ end
+ end
+ end
+ return emails
+ end
+ emails = expand_project_recursively(projects, req_project)
+ unless emails.empty?
+ m.reply "(#{req_project}) #{emails.sort.uniq.join(', ')}"
+ else
+ m.reply "No such project: #{req_project}"
+ end
+ end
+
def expand_alias(m, params)
now = Time.now.tv_sec
unless @@cached['alias'] and @@cached['alias'][0] > now-600
@@ -340,6 +391,7 @@ class GentooPlugin < Plugin
"changelog" => "changelog #{Bold}[cat/]package#{Bold} : Produce changelog statistics for a given package",
"devaway" => "devaway #{Bold}devname|list#{Bold} : Print the .away for a developer (if any). Using 'list' shows the developers who are away.",
"herd" => "herd #{Bold}herdname#{Bold} : Print the members of a herd.",
+ "proj" => "proj #{Bold}project-email#{Bold} : Print the members of a project.",
"expn" => "expn #{Bold}alias#{Bold} : Print the addresses on a Gentoo mail alias.",
"glsa" => [
"glsa #{Bold}GLSA-ID#{Bold} : Prints the title and reference IDs for a given GLSA.",
@@ -371,6 +423,7 @@ plugin.default_auth( 'view', true )
REGEX_CP = /^(?:[-[:alnum:]]+\/)?[-+_[:alnum:]]+$/
REGEX_DEV = /^[-_[:alnum:]]+$/
REGEX_HERD = /^[-_[:alnum:]]+$/
+REGEX_PROJECT = /^[-_@.[:alnum:]]+$/
REGEX_GLSA = /^[-1234567890]+$/
plugin.map 'meta -v :pkg',
@@ -428,6 +481,14 @@ plugin.map 'herd :herd',
:thread => 'yes',
:auth_path => 'view'
+plugin.map 'proj :project',
+ :requirements => {
+ :project => REGEX_PROJECT,
+ },
+ :action => 'project',
+ :thread => 'yes',
+ :auth_path => 'view'
+
plugin.map 'expn :alias',
:requirements => {
:alias => REGEX_DEV,
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2012-04-01 15:59 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2012-04-01 15:59 UTC (permalink / raw
To: gentoo-commits
commit: 0b4dcf5e70f19b3b4713d6f14a35328fa1aebd31
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 1 15:59:46 2012 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Apr 1 15:59:46 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/rbot-gentoo.git;a=commit;h=0b4dcf5e
Add PDEPEND support.
---
gentoo-data.rb | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index e1b8800..8749910 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -306,6 +306,10 @@ class GentooPlugin < Plugin
depcommon(m, 'DEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/dindex/', params)
end
+ def pdep(m, params)
+ depcommon(m, 'PDEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/pindex/', params)
+ end
+
def rdep(m, params)
depcommon(m, 'RDEPEND', 'http://qa-reports.gentoo.org/output/genrdeps/rindex/', params)
end
@@ -327,7 +331,7 @@ class GentooPlugin < Plugin
end
@@help_gentoo = {
- "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}",
+ "gentoo" => "Available commands: #{Bold}meta#{Bold}, #{Bold}changelog#{Bold}, #{Bold}devaway#{Bold}, #{Bold}herd#{Bold}, #{Bold}expn#{Bold}, #{Bold}glsa#{Bold}, #{Bold}earch#{Bold}, #{Bold}rdep#{Bold}, #{Bold}ddep#{Bold}, #{Bold}pdep#{Bold}",
"meta" => [
"meta #{Bold}[cat/]package#{Bold} : Print metadata for the given package",
"meta -v #{Bold}[cat/]package#{Bold} : Print metadata for the given package and the members of the package herds.",
@@ -343,6 +347,7 @@ class GentooPlugin < Plugin
"earch" => "earch #{Bold}[cat/]package#{Bold} : Prints the versions and effective keywords for a given package.",
"rdep" => "rdep #{Bold}[cat/]package#{Bold} : Prints the reverse RDEPENDs for a given package.",
"ddep" => "ddep #{Bold}[cat/]package#{Bold} : Prints the reverse DEPENDS for a given package.",
+ "pdep" => "pdep #{Bold}[cat/]package#{Bold} : Prints the reverse PDEPENDs for a given package.",
}
@@ -454,6 +459,14 @@ plugin.map 'ddep :pkg',
:thread => 'yes',
:auth_path => 'view'
+plugin.map 'pdep :pkg',
+ :requirements => {
+ :pkg => REGEX_CP,
+ },
+ :action => 'pdep',
+ :thread => 'yes',
+ :auth_path => 'view'
+
plugin.map 'rdep :pkg',
:requirements => {
:pkg => REGEX_CP,
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2012-02-20 1:40 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2012-02-20 1:40 UTC (permalink / raw
To: gentoo-commits
commit: b8d876fc8e8ce96edef842257998d0570566205e
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 20 01:40:02 2012 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Feb 20 01:40:02 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/rbot-gentoo.git;a=commit;h=b8d876fc
Handle output that does not contain any herds.
---
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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [gentoo-commits] proj/rbot-gentoo:master commit in: /
@ 2011-11-17 19:55 Robin H. Johnson
0 siblings, 0 replies; 20+ messages in thread
From: Robin H. Johnson @ 2011-11-17 19:55 UTC (permalink / raw
To: gentoo-commits
commit: f7cf938b74e113e4e30c14aba5c1095bd0a06046
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 17 19:55:46 2011 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 19:55:46 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/rbot-gentoo.git;a=commit;h=f7cf938b
This has been running already for bug #381415, but it doesn't quite work.
---
gentoo-data.rb | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gentoo-data.rb b/gentoo-data.rb
index f4e6608..f4e10d1 100644
--- a/gentoo-data.rb
+++ b/gentoo-data.rb
@@ -82,8 +82,13 @@ class GentooPlugin < Plugin
output = f.readlines
f.close
m.reply "#{output}"
- params[:herd] = output[0].gsub(/^.* Herd: ([^ ]+) .*$/, '\1').strip
- herd(m, params)
+ herds = output[0].gsub(/^.* Herd: ([^ ]+) .*$/, '\1').strip.split(/[, ]+/).map { |s| s.strip }.flatten
+ herds.each { |h|
+ debug("meta -v calling herd for #{h}")
+ p = params.clone
+ p[:herd] = h
+ herd(m, p)
+ }
end
def changelog(m, params)
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2016-11-22 4:26 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 15:01 [gentoo-commits] proj/rbot-gentoo:master commit in: / Robin H. Johnson
-- strict thread matches above, loose matches on Subject: below --
2016-11-22 4:25 Robin H. Johnson
2016-11-22 4:25 Robin H. Johnson
2016-11-22 4:17 Robin H. Johnson
2016-11-22 4:11 Robin H. Johnson
2016-08-13 18:24 Michał Górny
2016-06-15 3:13 Robin H. Johnson
2016-01-27 18:21 Michał Górny
2016-01-27 18:21 Michał Górny
2016-01-27 18:21 Michał Górny
2016-01-27 18:21 Michał Górny
2016-01-27 18:21 Michał Górny
2016-01-27 18:21 Michał Górny
2016-01-12 19:09 Michał Górny
2016-01-12 19:09 Michał Górny
2016-01-12 19:09 Michał Górny
2016-01-11 16:25 Robin H. Johnson
2012-04-01 15:59 Robin H. Johnson
2012-02-20 1:40 Robin H. Johnson
2011-11-17 19:55 Robin H. Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox