From: Michael Hanke Date: Thu, 20 Aug 2009 19:04:56 +0000 (-0400) Subject: Adjust to changes in DDE and build for more releases. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b0f60baa33494e744efa8e48b0c983e6dbddc068;p=neurodebian.git Adjust to changes in DDE and build for more releases. --- diff --git a/neurodebian.cfg b/neurodebian.cfg index 9d46087..c289d95 100644 --- a/neurodebian.cfg +++ b/neurodebian.cfg @@ -1,6 +1,8 @@ [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 @@ -49,3 +51,4 @@ gutsy = Ubuntu 7.10 "Gutsy Gibbon" (gutsy) 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) diff --git a/neurodebian/dde.py b/neurodebian/dde.py index 746fee1..6593e44 100644 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -5,6 +5,7 @@ import pysvn import json from debian_bundle import deb822 +import apt from ConfigParser import SafeConfigParser from optparse import OptionParser, Option, OptionGroup, OptionConflictError import sys @@ -300,7 +301,9 @@ def _store_pkg(cfg, db, st, origin, codename, component, baseurl): 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'])]) @@ -358,13 +361,37 @@ def import_dde(cfg, db): 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 diff --git a/neurodebian/templates/pkg.rst b/neurodebian/templates/pkg.rst index ec84f12..7f12e1c 100644 --- a/neurodebian/templates/pkg.rst +++ b/neurodebian/templates/pkg.rst @@ -18,11 +18,11 @@ Associated `Debian Pure Blends `_: 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. @@ -34,7 +34,7 @@ are available too. :ref:`front page `. {% endif %} -{{ dist[0] }} [{{ distpkg.drc.split()[2]}}]: +{{ dist[0] }} [{{ distpkg.component}}]: `{{distpkg.version}} <../../debian/{{ distpkg.poolurl }}>`_ [{{ ', '.join(distpkg.architecture) }}] {% if loop.last %} @@ -47,20 +47,20 @@ are available too. {% 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}} `_ [{{ ', '.join(distpkg.architecture) }}] +{{ dist[0] }} [{{ distpkg.component}}]: + `{{distpkg.version}} `_ [{{ ', '.join(distpkg.architecture) }}] {% if loop.last %} .. seealso:: - Maintainer: {{ distpkg.maintainer }} - - Bug reports: `Debian bugtracking system `_ + - Bug reports: `Debian bugtracking system `_ {% if distpkg.popcon %} - Reported installations: {{ distpkg.popcon.insts }} (`more info `_) {% endif %} @@ -77,20 +77,20 @@ for more information about its current status. {% 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}} `_ [{{ ', '.join(distpkg.architecture) }}] +{{ dist[0] }} [{{ distpkg.component }}]: + `{{distpkg.version}} `_ [{{ ', '.join(distpkg.architecture) }}] {% if loop.last %} .. seealso:: - Maintainer: {{ distpkg.maintainer }} - - Bug reports: `Ubuntu Launchpad `_ + - Bug reports: `Ubuntu Launchpad `_ {% if distpkg.popcon %} - Reported installations: {{ distpkg.popcon.insts }} {% endif %}