/usr/share/doc/ruby-debian/examples/unmet_packages.rb is in ruby-debian 0.3.8build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #!/usr/bin/ruby
# Copyright (c) Fumitoshi UKAI <ukai@debian.or.jp>
# GPL2
require 'debian'
require 'getoptlong'
file=''
top='/org/ftp.debian.org/ftp/dists/stable'
arch=Debian::Dpkg.installation_architecture
opts = GetoptLong.new(
["--file", "-f", GetoptLong::REQUIRED_ARGUMENT],
["--arch", "-a", GetoptLong::REQUIRED_ARGUMENT],
["--top", "-t", GetoptLong::REQUIRED_ARGUMENT],
["--help", "-h", GetoptLong::NO_ARGUMENT])
opts.each {|opt,val|
case opt
when "--file" then file = val
when "--arch" then arch = val
when "--top" then top = top
else
$stderr.puts "usage: $0 [-a arch] [-t top] [-f file]"
exit 1
end
}
packages = Debian::Packages.new
Debian::COMPONENT.collect {|c|
f = file
if file == ""
f = "#{top}/#{c}/binary-#{arch}/Packages"
end
packages += Debian::Packages.new(f)
}
packages.each_package {|p|
puts "#{p}: " + (p.provides ? ("(=>" + p.provides.join(",") + ")") : "")
puts p.unmet(packages).each {|u| u.to_s }
}
|