[dde]
-dists = debian-lenny debian-squeeze debian-sid ubuntu-jaunty
-pkgquery_url = http://dde.debian.net/dde/q/udd/packages
+dists = debian-lenny debian-squeeze debian-sid debian-experimental
+ ubuntu-hardy ubuntu-intrepid ubuntu-jaunty ubuntu-karmic
+
+pkgquery_url = http://dde.debian.net/dde/q/udd
[packages]
# Packages listed in the following taskfiles will be featured on the website
hardy = Ubuntu 8.04 LTS "Hardy Heron" (hardy)
intrepid = Ubuntu 8.10 "Intrepid Ibex" (intrepid)
jaunty = Ubuntu 9.04 "Jaunty Jackalope" (jaunty)
+karmic = Ubuntu upcoming release (karmic)
import pysvn
import json
from debian_bundle import deb822
+import apt
from ConfigParser import SafeConfigParser
from optparse import OptionParser, Option, OptionGroup, OptionConflictError
import sys
info['version'] = st['Version']
# origin
- info['drc'] = '%s %s %s' % (origin, codename, component)
+ info['distribution'] = origin
+ info['release'] = codename
+ info['component'] = component
# pool url
info['poolurl'] = '/'.join([os.path.dirname(st['Filename'])])
query_url = cfg.get('dde', 'pkgquery_url')
for p in db.keys():
# get freshest
- q = dde_get(query_url + "/all/%s" % p)
+ q = dde_get(query_url + "/packages/all/%s" % p)
if q:
db[p]['main'] = q
for d in dists:
- q = dde_get(query_url + "/prio-%s/%s" % (d, p))
- if q:
- db[p][(trans_codename(d.split('-')[1], cfg),d)] = q
+ dist, release = d.split('-')
+ q = dde_get(query_url + "/dist/d:%s/r:%s/p:%s" % (dist, release, p))
+ if not q:
+ continue
+ # accumulate data for multiple over archs
+ item = None
+ for i in q:
+ if item is None:
+ item = i
+ # turn into a list to append others later
+ item['architecture'] = [item['architecture']]
+ else:
+ comp = apt.VersionCompare(i['version'], item['version'])
+ # found another arch for the same version
+ if comp == 0:
+ item['architecture'].append(i['architecture'])
+ # found newer version, dump the old ones
+ elif comp > 0:
+ item = i
+ # turn into a list to append others later
+ item['architecture'] = [item['architecture']]
+ # simply ignore older versions
+ else:
+ pass
+
+ # finally assign the new package data
+ db[p][(trans_codename(d.split('-')[1], cfg),d)] = item
return db
Binary packages
===============
-{% for dist, distpkg in db|dictsort if dist[1].startswith('neurodebian') %}
-{% if loop.first %}
NeuroDebian
-----------
+{% for dist, distpkg in db|dictsort if dist[1].startswith('neurodebian') %}
+{% if loop.first %}
The repository contains binary packages for the following distribution
releases and system architectures. The corresponding source packages
are available too.
:ref:`front page <repository_howto>`.
{% endif %}
-{{ dist[0] }} [{{ distpkg.drc.split()[2]}}]:
+{{ dist[0] }} [{{ distpkg.component}}]:
`{{distpkg.version}} <../../debian/{{ distpkg.poolurl }}>`_ [{{ ', '.join(distpkg.architecture) }}]
{% if loop.last %}
{% endfor %}
-{% for dist, distpkg in db|dictsort if dist[1].startswith('debian') %}
-{% if loop.first %}
Debian
------
+{% for dist, distpkg in db|dictsort if dist[1].startswith('debian') %}
+{% if loop.first %}
{% endif %}
-{{ dist[0] }} [{{ distpkg.drc.split()[2]}}]:
- `{{distpkg.version}} <http://packages.debian.org/search?suite={{ distpkg.drc.split()[1]}}&keywords={{ pkg }}>`_ [{{ ', '.join(distpkg.architecture) }}]
+{{ dist[0] }} [{{ distpkg.component}}]:
+ `{{distpkg.version}} <http://packages.debian.org/search?suite={{ distpkg.release}}&keywords={{ pkg }}>`_ [{{ ', '.join(distpkg.architecture) }}]
{% if loop.last %}
.. seealso::
- Maintainer: {{ distpkg.maintainer }}
- - Bug reports: `Debian bugtracking system <http://bugs.debian.org/src:{{ distpkg.sv.split()[0] }}>`_
+ - Bug reports: `Debian bugtracking system <http://bugs.debian.org/src:{{ distpkg.source }}>`_
{% if distpkg.popcon %}
- Reported installations: {{ distpkg.popcon.insts }} (`more info <http://qa.debian.org/popcon.php?package={{ pkg }}>`_)
{% endif %}
{% endfor %}
-{% for dist, distpkg in db.iteritems() if dist[1].startswith('ubuntu') %}
-{% if loop.first %}
Ubuntu
------
+{% for dist, distpkg in db.iteritems() if dist[1].startswith('ubuntu') %}
+{% if loop.first %}
{% endif %}
-{{ dist[0] }} [{{ distpkg.drc.split()[2]}}]:
- `{{distpkg.version}} <http://packages.ubuntu.com/search?suite={{ distpkg.drc.split()[1]}}&keywords={{ pkg }}>`_ [{{ ', '.join(distpkg.architecture) }}]
+{{ dist[0] }} [{{ distpkg.component }}]:
+ `{{distpkg.version}} <http://packages.ubuntu.com/search?suite={{ distpkg.release }}&keywords={{ pkg }}>`_ [{{ ', '.join(distpkg.architecture) }}]
{% if loop.last %}
.. seealso::
- Maintainer: {{ distpkg.maintainer }}
- - Bug reports: `Ubuntu Launchpad <https://bugs.launchpad.net/ubuntu/+source/{{ distpkg.sv.split()[0] }}>`_
+ - Bug reports: `Ubuntu Launchpad <https://bugs.launchpad.net/ubuntu/+source/{{ distpkg.source }}>`_
{% if distpkg.popcon %}
- Reported installations: {{ distpkg.popcon.insts }}
{% endif %}