| 21 |
source2binaries = {} # maps a source package to its binaries |
source2binaries = {} # maps a source package to its binaries |
| 22 |
binary2source = {} # maps a binary package to its source |
binary2source = {} # maps a binary package to its source |
| 23 |
|
|
| 24 |
|
def read_font_reviews(fname): |
| 25 |
|
y = yaml.load(file(fname)) |
| 26 |
|
packages = {} # maps pkg to the font review for it |
| 27 |
|
for pkg, data in y.iteritems(): |
| 28 |
|
if data.has_key('url'): |
| 29 |
|
packages[pkg] = data['url'] |
| 30 |
|
return packages |
| 31 |
|
|
| 32 |
def read_shortdesc(fname): |
def read_shortdesc(fname): |
| 33 |
global binary2source |
global binary2source |
| 34 |
source_descs = {} # source package -> (binary package -> short description) |
source_descs = {} # source package -> (binary package -> short description) |
| 345 |
# read short descriptions |
# read short descriptions |
| 346 |
shortdescs = read_shortdesc(os.path.join(dir, "shortdesc.txt")) |
shortdescs = read_shortdesc(os.path.join(dir, "shortdesc.txt")) |
| 347 |
|
|
| 348 |
|
font_reviews = read_font_reviews(os.path.join(dir, "debian-font-review.yaml")) |
| 349 |
|
|
| 350 |
# Create the XML documents |
# Create the XML documents |
| 351 |
while 1: |
while 1: |
| 352 |
line = sys.stdin.readline() |
line = sys.stdin.readline() |
| 606 |
else: |
else: |
| 607 |
shortdesc_sig = ''.__hash__() |
shortdesc_sig = ''.__hash__() |
| 608 |
|
|
| 609 |
|
# Add font review links |
| 610 |
|
if font_reviews.has_key(pkg): |
| 611 |
|
elt = doc.createElement("fonts") |
| 612 |
|
elt.setAttribute('href', font_reviews[pkg]) |
| 613 |
|
root_elt.setAttribute("fonts", "yes") |
| 614 |
|
root_elt.appendChild(elt) |
| 615 |
|
fonts_sig = font_reviews[pkg] |
| 616 |
|
else: |
| 617 |
|
root_elt.setAttribute("fonts", "no") |
| 618 |
|
fonts_sig = '' |
| 619 |
|
|
| 620 |
# Get security issues |
# Get security issues |
| 621 |
if security.has_key(pkg): |
if security.has_key(pkg): |
| 622 |
root_elt.setAttribute('security', security[pkg]) |
root_elt.setAttribute('security', security[pkg]) |
| 630 |
sig = (pts.get(pkg, "0"), dc_sig, wnpp_sig, override_sig, dehs_sig, |
sig = (pts.get(pkg, "0"), dc_sig, wnpp_sig, override_sig, dehs_sig, |
| 631 |
ubuntu_sig, s_rc, s_normal, s_wishlist, s_fixed, s_gift, s_help, |
ubuntu_sig, s_rc, s_normal, s_wishlist, s_fixed, s_gift, s_help, |
| 632 |
subsig, svnbuildstat_sig, transitions_sig, lintian_sig, |
subsig, svnbuildstat_sig, transitions_sig, lintian_sig, |
| 633 |
shortdesc_sig, piuparts_sig, new_queue_sig, i18n_sig, sec_sig) |
shortdesc_sig, piuparts_sig, new_queue_sig, i18n_sig, |
| 634 |
|
fonts_sig, sec_sig) |
| 635 |
if sigs.has_key(pkg) and sig == sigs[pkg] and \ |
if sigs.has_key(pkg) and sig == sigs[pkg] and \ |
| 636 |
os.path.isfile("%s/%s/%s/other.xml" % (odir, hash, pkg)): |
os.path.isfile("%s/%s/%s/other.xml" % (odir, hash, pkg)): |
| 637 |
continue |
continue |