~ubuntu-branches/ubuntu/karmic/reportbug/karmic

« back to all changes in this revision

Viewing changes to checks/compare_pseudo-pkgs_lists.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Hahler
  • Date: 2008-06-20 18:11:24 UTC
  • Revision ID: james.westby@ubuntu.com-20080620181124-1yyubiito50fn2c2
Tags: 3.41ubuntu1
* Merge from Debian unstable. Remaining Ubuntu specific changes:
  - reportbug.conf:
    - "bts ubuntu"
    - "smtphost fiordland.ubuntu.com":
      Added the fiordland.ubuntu.com SMTP server in reportbug.conf so
      that reportbug works without a MTA.
  - reportbug_submit.py: only display ubuntu-users specific message if
    BTS "ubuntu" is used in send_report.
  - reportbug.1: mention Ubuntu specific changes (LP: #163924)
* Fixes LP: #239124, #204009

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
#
 
3
# Author: Sandro Tosi
 
4
# Date: 2008-05-16
 
5
# License: Public domain
 
6
#
 
7
# Python script to compare pseudo-packages listed in reportbug
 
8
# agaists the official list on ftp-master
 
9
 
 
10
import sys, os
 
11
sys.path = ['.'] + sys.path
 
12
 
 
13
import debianbts
 
14
 
 
15
import urllib, re
 
16
 
 
17
# separete a sequence of "char not spaces", from at least one space (ftp-master uses tabs), from anything after tabs
 
18
# we group the first and the latter, so we get the pseudo-packages name and description
 
19
dictparse = re.compile(r'([^\s]+)\s+(.+)',re.IGNORECASE)
 
20
 
 
21
ftpmaster_list = {}
 
22
pseudo = urllib.urlopen('http://ftp-master.debian.org/bzr/ftpmaster-dak/config/debian/pseudo-packages.description')
 
23
for l in pseudo:
 
24
    m = dictparse.search(l)
 
25
    ftpmaster_list[m.group(1)] = m.group(2)
 
26
 
 
27
bts_keys=debianbts.debother.keys();
 
28
 
 
29
diff_rb_ftp = set(bts_keys)-set(ftpmaster_list)
 
30
diff_ftp_rb = set(ftpmaster_list)-set(bts_keys)
 
31
 
 
32
print "pseudo-pkgs in reportbug not in ftpmaster list:", diff_rb_ftp
 
33
 
 
34
for pkg in diff_rb_ftp:
 
35
    print "   ", pkg,": ", debianbts.debother[pkg]
 
36
 
 
37
print "pseudo-pkgs in ftpmaster list not in reprotbug:", diff_ftp_rb
 
38
 
 
39
for pkg in diff_ftp_rb:
 
40
    print "   ", pkg,": ", ftpmaster_list[pkg]