/[qa]/trunk/pts/www/bin/other_to_xml.py
ViewVC logotype

Diff of /trunk/pts/www/bin/other_to_xml.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 946 by jeroen, Mon Jan 31 23:34:37 2005 UTC revision 947 by jeroen, Sun Feb 13 17:59:30 2005 UTC
# Line 4  Line 4 
4  # vim: expandtab  # vim: expandtab
5    
6  # Copyright 2002 Raphaël Hertzog  # Copyright 2002 Raphaël Hertzog
7    # Copyright 2005 Jeroen van Wolffelaar
8  # This file is distributed under the terms of the General Public License  # This file is distributed under the terms of the General Public License
9  # version 2 or (at your option) any later version.  # version 2 or (at your option) any later version.
10    
# Line 58  for dist in ("stable", "testing", "unsta Line 59  for dist in ("stable", "testing", "unsta
59          debcheck[dist][line.strip()] = 1          debcheck[dist][line.strip()] = 1
60      f.close()      f.close()
61    
62    # Read the list of packages with override disparities
63    override = {}
64    for dist in ("unstable", "experimental"):
65        override[dist] = {}
66        f = open(dir + "/override-disparities." + dist)
67        for line in f:
68            if line[0] != '-':
69                source = line.strip()[:-1]
70                override[dist][source] = []
71            else:
72                override[dist][source].append(line.strip()[2:])
73        f.close()
74    
75  # Read the list of source packages with debconf templates  # Read the list of source packages with debconf templates
76  debconf = {}  debconf = {}
77  # DISABLED until ddtp.debian.org is setup again  # DISABLED until ddtp.debian.org is setup again
# Line 188  while 1: Line 202  while 1:
202          root_elt.setAttribute("wnpp", "no")          root_elt.setAttribute("wnpp", "no")
203          wnpp_sig = "n"          wnpp_sig = "n"
204    
205        # Get override info [JvW]
206        override_elt = None
207        override_sig = []
208        for dist in [ 'unstable', 'experimental' ]:
209            if override[dist].has_key(pkg):
210                if not override_elt: override_elt = doc.createElement("override")
211                disparities = override[dist][pkg]
212                override_sig.append(disparities)
213                elt_g = doc.createElement("group")
214                elt_g.setAttribute("suite", dist)
215                for disp in disparities:
216                    elt = doc.createTextNode(disp)
217                    elt_disp = doc.createElement("disparity")
218                    elt_disp.appendChild(elt)
219                    elt_g.appendChild(elt_disp)
220            override_elt.appendChild(elt_g)
221    
222        if override_elt:
223            root_elt.appendChild(override_elt)
224            root_elt.setAttribute("override", "yes")
225        else:
226            root_elt.setAttribute("override", "no")
227    
228      # Get watch information [FG]      # Get watch information [FG]
229      if watch.has_key(pkg):      if watch.has_key(pkg):
230          new = str(watch[pkg]['new'])          new = str(watch[pkg]['new'])
# Line 212  while 1: Line 249  while 1:
249    
250      # TODO: try to do that signature checking before the creation of XML DOM      # TODO: try to do that signature checking before the creation of XML DOM
251      # Build the sig and check if anything changed      # Build the sig and check if anything changed
252      sig = "%s %s %s %s %d/%d/%d/%d %s" % (pts.get(pkg, "0"), dc_sig, wnpp_sig, watch_sig, s_rc, s_normal, s_wishlist, s_fixed, subsig)      sig = (pts.get(pkg, "0"), dc_sig, wnpp_sig, override_sig, watch_sig, s_rc, s_normal, s_wishlist, s_fixed, subsig)
253      if sigs.has_key(pkg) and sig == sigs[pkg]:      if sigs.has_key(pkg) and sig == sigs[pkg]:
254          continue          continue
255      sigs[pkg] = sig      sigs[pkg] = sig

Legend:
Removed from v.946  
changed lines
  Added in v.947

  ViewVC Help
Powered by ViewVC 1.1.5