From 83628712f5e4e53e1ed7776fdae80846deff9280 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Fri, 16 Jan 2015 17:37:04 +0000 Subject: unknown-packages-pts.py: check the unknown list of packages git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@31391 e39458fd-73e7-0310-bf30-c45bca0a0e42 --- check-external/unknown-packages-pts.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 check-external/unknown-packages-pts.py (limited to 'check-external') diff --git a/check-external/unknown-packages-pts.py b/check-external/unknown-packages-pts.py new file mode 100755 index 0000000000..7346d8f4c6 --- /dev/null +++ b/check-external/unknown-packages-pts.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +from BeautifulSoup import BeautifulSoup +import urllib2 +import json +import SOAPpy + +soup = BeautifulSoup(urllib2.urlopen('https://security-tracker.debian.org/tracker/data/unknown-packages').read()) +cache_file='known-unknown-packages.cache' + +pkgs=[ r('td')[0].string for r in soup('table')[0].findAll('tr')[1:] ] + +ws = SOAPpy.SOAPProxy('https://packages.qa.debian.org/cgi-bin/soap-alpha.cgi') + +for pkg in pkgs: + if not pkg in open(cache_file).read(): + try: + ws.versions(source=pkg) + except SOAPpy.faultType: + print pkg + else: + with open(cache_file, 'a') as file: + file.write(pkg+"\n") -- cgit v1.2.3