#!/usr/bin/ruby -I/usr/share/apt-listbugs/

###
### test the relay with get_bugs->get_status.
###

require 'debian/bts'
require 'debian/btssoap'
#$DEBUG=1
soap=Debian::BTSSOAP::Soap.new
pkglist = Debian::BTSSOAP::StringArray.new

### the packages I want to play with
pkglist << "nvidia-glx" << "mercury"

sa = Debian::BTSSOAP::StringArray.new

### try getting grave bugs.
reqbugs=soap.get_bugs('severity',  ["critical", "grave", "serious"], 'package', pkglist)
p reqbugs.length
reqbugs.each do |bug|
  sa << bug
end
soap.get_status(sa).each do |f|
  p f
end
