aboutsummaryrefslogtreecommitdiffstats
path: root/cgi/maintainers.cgi
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-01-06 01:07:55 +0000
committerNicolas Vigier <boklm@mageia.org>2011-01-06 01:07:55 +0000
commita4f149873af1e9cff9ab0829adfcd3eca1a3780d (patch)
treec1345b951f4c67e3e9c5bf57f984c3e9f901f17f /cgi/maintainers.cgi
downloadmga-youri-core-a4f149873af1e9cff9ab0829adfcd3eca1a3780d.tar
mga-youri-core-a4f149873af1e9cff9ab0829adfcd3eca1a3780d.tar.gz
mga-youri-core-a4f149873af1e9cff9ab0829adfcd3eca1a3780d.tar.bz2
mga-youri-core-a4f149873af1e9cff9ab0829adfcd3eca1a3780d.tar.xz
mga-youri-core-a4f149873af1e9cff9ab0829adfcd3eca1a3780d.zip
search in core, nonfree, tainted instead of main, contrib
Diffstat (limited to 'cgi/maintainers.cgi')
-rwxr-xr-xcgi/maintainers.cgi65
1 files changed, 65 insertions, 0 deletions
diff --git a/cgi/maintainers.cgi b/cgi/maintainers.cgi
new file mode 100755
index 0000000..66665e6
--- /dev/null
+++ b/cgi/maintainers.cgi
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+# $Id: maintainers.cgi 1179 2006-08-05 08:30:57Z warly $
+
+=head1 NAME
+
+maintainers.cgi - youri CGI interface to maintainers list
+
+=head1 VERSION
+
+Version 1.0
+
+=head1 DESCRIPTION
+
+This script allows to get package maintainers list through CGI interface.
+
+=head1 SYNOPSIS
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2004-2005, YOURI project
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 AUTHORS
+
+Guillaume Rousse <guillomovitch@zarb.org>,
+
+=cut
+
+use Youri::Bugzilla;
+use CGI;
+use AppConfig qw/:argcount :expand/;
+use strict;
+use warnings;
+
+my $config = AppConfig->new(
+ {
+ GLOBAL => {
+ DEFAULT => undef,
+ EXPAND => EXPAND_ALL,
+ ARGCOUNT => ARGCOUNT_ONE,
+ }
+ },
+ host => { ARGCOUNT => ARGCOUNT_ONE },
+ base => { ARGCOUNT => ARGCOUNT_ONE },
+ user => { ARGCOUNT => ARGCOUNT_ONE },
+ pass => { ARGCOUNT => ARGCOUNT_ONE },
+);
+
+my $home = (getpwnam($ENV{PROJECT}))[7];
+foreach my $file ("/etc/youri/maintainers.conf", "$home/.youri/maintainers.conf") {
+ $config->file($file) if -f $file && -r $file;
+}
+
+my $bugzilla = Bugzilla->new(
+ $config->host(),
+ $config->base(),
+ $config->user(),
+ $config->pass(),
+);
+
+my $cgi = CGI->new();
+print $cgi->header(-type=>'text/plain');
+
+$bugzilla->browse_packages(sub { print "$_[0]\t$_[2]\n"; });