r11749 - in /tools/snapshots/scripts: config pkg-gnome-package

kilian at users.alioth.debian.org kilian at users.alioth.debian.org
Sun Jul 1 16:13:17 UTC 2007


Author: kilian
Date: Sun Jul  1 16:13:17 2007
New Revision: 11749

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=11749
Log:
cleanup for external config - might be added as auto-SVN-fetched if works ok.

Added:
    tools/snapshots/scripts/config
Modified:
    tools/snapshots/scripts/pkg-gnome-package

Added: tools/snapshots/scripts/config
URL: http://svn.debian.org/wsvn/pkg-gnome/tools/snapshots/scripts/config?rev=11749&op=file
==============================================================================
--- tools/snapshots/scripts/config (added)
+++ tools/snapshots/scripts/config Sun Jul  1 16:13:17 2007
@@ -1,0 +1,271 @@
+[DEFAULT]
+project: pkg-gnome
+base: ~/debian/%(project)s/snapshot
+changelog_maintainer: Kilian Krause <kilian at debian.org>
+changelog_text: SVN snapshot for the pkg-gnome team. 
+repository: svn://svn.debian.org/%(project)s/
+sign: 9AD0AC85
+upload: seraph
+
+version_debian-etch: etch
+version_debian-sarge: sarge
+version_debian-sid: sid
+version_ubuntu-feisty: feisty
+version_ubuntu-edgy: edgy
+version_ubuntu-dapper: dapper
+version_debian-etch-experimental: etch+experimental
+version_debian-sarge-experimental: sarge+experimental
+version_debian-sid-experimental: sid+experimental
+version_ubuntu-feisty-experimental: feisty+experimental
+version_ubuntu-edgy-experimental: edgy+experimental
+version_ubuntu-dapper-experimental: dapper+experimental
+
+dists_unstable: debian-sid debian-etch debian-sarge ubuntu-feisty ubuntu-edgy ubuntu-dapper
+dists_experimental: debian-sid-experimental debian-etch-experimental debian-sarge-experimental ubuntu-feisty-experimental ubuntu-edgy-experimental ubuntu-dapper-experimental
+
+dist: %(dists_unstable)s
+
+[desktop/unstable/at-spi]
+[desktop/unstable/atk1.0]
+[desktop/unstable/bug-buddy]
+[desktop/unstable/control-center]
+[desktop/unstable/dasher]
+[desktop/unstable/deskbar-applet]
+[desktop/unstable/eel2]
+[desktop/unstable/ekiga]
+[desktop/unstable/eog]
+[desktop/unstable/epiphany-browser]
+[desktop/unstable/evince]
+[desktop/unstable/file-roller]
+[desktop/unstable/gail]
+[desktop/unstable/gcalctool]
+[desktop/unstable/gconf-editor]
+[desktop/unstable/gconf2]
+[desktop/unstable/gdm]
+[desktop/unstable/gedit]
+[desktop/unstable/glade-3]
+[desktop/unstable/glade]
+[desktop/unstable/glib2.0]
+[desktop/unstable/gnome-applets]
+[desktop/unstable/gnome-backgrounds]
+[desktop/unstable/gnome-common]
+[desktop/unstable/gnome-desktop]
+[desktop/unstable/gnome-doc-utils]
+[desktop/unstable/gnome-games-extra-data]
+[desktop/unstable/gnome-games]
+[desktop/unstable/gnome-icon-theme]
+[desktop/unstable/gnome-keyring-manager]
+[desktop/unstable/gnome-keyring]
+[desktop/unstable/gnome-mag]
+[desktop/unstable/gnome-media]
+[desktop/unstable/gnome-menus]
+[desktop/unstable/gnome-mime-data]
+[desktop/unstable/gnome-netstatus]
+[desktop/unstable/gnome-nettool]
+[desktop/unstable/gnome-orca]
+[desktop/unstable/gnome-panel]
+[desktop/unstable/gnome-power-manager]
+[desktop/unstable/gnome-python-desktop]
+[desktop/unstable/gnome-python]
+[desktop/unstable/gnome-screensaver]
+[desktop/unstable/gnome-session]
+[desktop/unstable/gnome-speech]
+[desktop/unstable/gnome-system-monitor]
+[desktop/unstable/gnome-system-tools]
+[desktop/unstable/gnome-terminal]
+[desktop/unstable/gnome-themes]
+[desktop/unstable/gnome-user-docs]
+[desktop/unstable/gnome-utils]
+[desktop/unstable/gnome-vfs2]
+[desktop/unstable/gok]
+[desktop/unstable/gtk+2.0]
+[desktop/unstable/gtk-doc]
+[desktop/unstable/gtk2-engines]
+[desktop/unstable/gtksourceview]
+[desktop/unstable/gucharmap]
+[desktop/unstable/intltool]
+[desktop/unstable/libart-lgpl]
+[desktop/unstable/libbonobo]
+[desktop/unstable/libbonoboui]
+[desktop/unstable/libcroco]
+[desktop/unstable/libgail-gnome]
+[desktop/unstable/libglade2]
+[desktop/unstable/libgnome]
+[desktop/unstable/libgnomecanvas]
+[desktop/unstable/libgnomeprint]
+[desktop/unstable/libgnomeprintui]
+[desktop/unstable/libgnomeui]
+[desktop/unstable/libgtkhtml2]
+[desktop/unstable/libgtksourceviewmm]
+[desktop/unstable/libgtop2]
+[desktop/unstable/liboobs]
+[desktop/unstable/librsvg]
+[desktop/unstable/libsoup]
+[desktop/unstable/libwnck]
+[desktop/unstable/libxklavier]
+[desktop/unstable/meta-gnome2]
+[desktop/unstable/metacity]
+[desktop/unstable/nautilus-cd-burner]
+[desktop/unstable/nautilus]
+[desktop/unstable/pango1.0]
+[desktop/unstable/pessulus]
+[desktop/unstable/pygobject]
+[desktop/unstable/pygtk]
+[desktop/unstable/pyorbit]
+[desktop/unstable/sabayon]
+[desktop/unstable/scrollkeeper]
+[desktop/unstable/seahorse]
+[desktop/unstable/sound-juicer]
+[desktop/unstable/startup-notification]
+[desktop/unstable/system-tools-backends/2.2.1-4]
+[desktop/unstable/system-tools-backends]
+[desktop/unstable/totem]
+[desktop/unstable/vino]
+[desktop/unstable/vte]
+[desktop/unstable/yelp]
+[desktop/unstable/zenity]
+
+[packages/unstable/accerciser]
+[packages/unstable/alleyoop]
+[packages/unstable/balsa]
+[packages/unstable/brasero]
+native: True
+[packages/unstable/clearlooks]
+[packages/unstable/contact-lookup-applet]
+[packages/unstable/devhelp]
+[packages/unstable/devilspie]
+[packages/unstable/dmz-cursor-theme]
+[packages/unstable/doc-gnome-hig]
+[packages/unstable/epiphany-extensions]
+[packages/unstable/gaim/trunk]
+native: True
+[packages/unstable/gamin]
+[packages/unstable/gazpacho]
+[packages/unstable/gdesklets-data]
+[packages/unstable/gdesklets]
+[packages/unstable/gdm-themes]
+[packages/unstable/gedit-plugins]
+[packages/unstable/ghex]
+[packages/unstable/gksu]
+[packages/unstable/glabels]
+[packages/unstable/gnome-app-install]
+[packages/unstable/gnome-bluetooth]
+[packages/unstable/gnome-cups-manager]
+[packages/unstable/gnome-hearts]
+[packages/unstable/gnome-mud]
+[packages/unstable/gnome-python-extras]
+[packages/unstable/gnome-spell]
+[packages/unstable/gnome-themes-extras]
+[packages/unstable/gnome-user-share]
+[packages/unstable/gnome-vfs-obexftp]
+[packages/unstable/gossip]
+[packages/unstable/gtetrinet]
+[packages/unstable/gtodo-applet]
+[packages/unstable/gtodo]
+[packages/unstable/gtranslator]
+[packages/unstable/gweled]
+[packages/unstable/gwget2]
+[packages/unstable/gyrus]
+[packages/unstable/hotwire]
+[packages/unstable/human-icon-theme]
+[packages/unstable/industrial-cursor-theme]
+[packages/unstable/java-access-bridge]
+[packages/unstable/jhbuild]
+[packages/unstable/last-exit]
+[packages/unstable/leafpad]
+[packages/unstable/libcm]
+[packages/unstable/libgda2]
+[packages/unstable/libgda3]
+[packages/unstable/libgksu1.2]
+[packages/unstable/libgksu]
+[packages/unstable/libgksuui1.0]
+[packages/unstable/libgnetwork]
+[packages/unstable/libgnomecups]
+[packages/unstable/libgnomedb3]
+[packages/unstable/libgnomedb]
+[packages/unstable/libgnomekbd]
+[packages/unstable/libgnomesu]
+[packages/unstable/loudmouth]
+[packages/unstable/meld]
+[packages/unstable/mergeant]
+[packages/unstable/mozilla-bonobo]
+[packages/unstable/nautilus-actions]
+[packages/unstable/nautilus-python]
+[packages/unstable/nautilus-sendto]
+[packages/unstable/nemiver]
+[packages/unstable/netspeed]
+[packages/unstable/notification-daemon]
+[packages/unstable/pidgin/trunk]
+[packages/unstable/regexxer]
+[packages/unstable/rhythmbox]
+[packages/unstable/shared-mime-info]
+[packages/unstable/tangerine-icon-theme]
+[packages/unstable/thewidgetfactory]
+[packages/unstable/tsclient]
+[packages/unstable/ubuntulooks]
+[packages/unstable/update-manager]
+[packages/unstable/update-notifier]
+[packages/unstable/xchat-gnome]
+[packages/unstable/xdg-user-dirs-gtk]
+[packages/unstable/xdg-user-dirs]
+
+[tools/gnome-pkg-tools]
+
+
+[desktop/experimental/ekiga]
+dist:%(dists_experimental)s
+
+[desktop/experimental/eog]
+dist: %(dists_experimental)s
+
+[desktop/experimental/evince]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gconf2]
+dist: %(dists_experimental)s
+
+[desktop/experimental/glib2.0]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gnome-games]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gnome-orca]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gnome-system-monitor]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gtk+2.0]
+dist: %(dists_experimental)s
+
+[desktop/experimental/gtk2-engines]
+dist: %(dists_experimental)s
+
+[desktop/experimental/pango1.0]
+dist: %(dists_experimental)s
+
+[packages/experimental/brasero]
+native: True
+dist: %(dists_experimental)s
+
+[packages/experimental/gossip]
+dist: %(dists_experimental)s
+
+[packages/experimental/libgksu]
+dist: %(dists_experimental)s
+
+[packages/experimental/libgtksourceviewmm]
+dist: %(dists_experimental)s
+
+[packages/experimental/loudmouth]
+dist: %(dists_experimental)s
+
+[packages/experimental/rhythmbox]
+dist: %(dists_experimental)s
+
+[packages/experimental/software-properties]
+dist: %(dists_experimental)s
+
+[packages/experimental/update-manager]
+dist: %(dists_experimental)s

Modified: tools/snapshots/scripts/pkg-gnome-package
URL: http://svn.debian.org/wsvn/pkg-gnome/tools/snapshots/scripts/pkg-gnome-package?rev=11749&op=diff
==============================================================================
--- tools/snapshots/scripts/pkg-gnome-package (original)
+++ tools/snapshots/scripts/pkg-gnome-package Sun Jul  1 16:13:17 2007
@@ -1,6 +1,7 @@
 #!/usr/bin/env python2.4
 
 # Copyright (C) 2005 Bastian Blank <waldi at debian.org>
+# Copyright (C) 2006,2007 Kilian Krause <kilian at debian.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,11 +17,28 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-import debian_linux, os, os.path, shutil, sys, time
-
-base = os.path.expanduser("~/debian/pkg-gnome/snapshot")
-repository = "svn://svn.debian.org/svn/pkg-gnome/"
-orig_base = os.path.expanduser("~/debian/pkg-gnome/orig")
+import os.path, shutil, sys, time, re
+import debian_linux.config
+
+class Config(dict):
+    schema_item_boolean = debian_linux.config.schema_item_boolean
+    schema_item_list = debian_linux.config.schema_item_list
+
+    class schema_item_path(object):
+        def __call__(self, i):
+            return os.path.expanduser(i.strip())
+
+    schema = {  
+        'base': schema_item_path(),
+        'dist': schema_item_list(),
+        'native': schema_item_boolean(),
+    }   
+
+    def __init__(self, config):
+        parser = debian_linux.config.config_parser(self.schema, [config])
+        for section in iter(parser):
+            # TODO: don't split sections in parser
+            self[section[0]] = parser[section]
 
 def _spawnvefn(mode, file, args, env, func, prepare, prepare_arg):
     # Internal helper; func is the exec*() function to use
@@ -51,9 +69,9 @@
                 raise error, "Not stopped, signaled or exited???"
 
 def spawnv_chdir(mode, file, args, dir):
-    return _spawnvefn(mode, file, args, None, os.execvp, spawnv_prepare, dir)
-
-def spawnv_prepare(arg):
+    return _spawnvefn(mode, file, args, None, os.execvp, spawnv_chdir_prepare, dir)
+
+def spawnv_chdir_prepare(arg):
     fd = os.open('/dev/null', os.O_WRONLY)
     os.dup2(fd, 1)
     os.close(fd)
@@ -87,14 +105,14 @@
     def _exec(self, executable, args):
         args_real = [executable.split(os.sep)[-1]] + args
         ret = os.spawnv(os.P_WAIT, executable, args_real)
-        #if ret:
-        #    raise ExecutionError(ret)
+        if ret:
+            raise RuntimeError, ret
 
     def _exec_chdir(self, executable, args, dir, force = False, output = True):
         args_real = [executable.split(os.sep)[-1]] + args
         ret = spawnv_chdir(os.P_WAIT, executable, args_real, dir)
         if ret:
-            raise ExecutionError(ret)
+            raise RuntimeError, ret
 
     def _mk(self, dir):
         try:
@@ -110,7 +128,9 @@
 
     def copy(self, target, target_class = None, **args):
         self._rm(target)
+        #self._cp(self.dir, target, ['.svn'])
         self._cp(self.dir, target)
+        # ^^ leave .svn in for svn-buildpackage
         if not target_class:
             target_class = self.__class__
         return target_class(target, **args)
@@ -119,14 +139,13 @@
         self._rm(self.dir)
 
 class repository_svn(storage):
-    def __init__(self, dir, path):
+    def __init__(self, dir, uri):
         storage.__init__(self, dir)
-        self.path = path
+        self.uri = uri
         self.checkout()
 
     def checkout(self):
-        path_real = '%s/%s' % (repository, self.path)
-        args = ['co', '-q', path_real, self.dir]
+        args = ['co', '-q', self.uri, self.dir]
         self.exec_svn(args)
 
     def exec_svn(self, args):
@@ -134,22 +153,15 @@
           self._exec("/usr/bin/svn", args)
         except OSError: pass
 
-def checkout(path):
-    checkout_dir = "checkout-" + path.replace('/', '_')
-    print "Updating %s ..." % (path)
-    repository_svn(checkout_dir, path)
-
-def package(path, dist, dist_version):
-    checkout_dir = "checkout-" + path.replace('/', '_')
-    last_file = "last-" + path.replace('/', '_') + '-' + dist
-    checkout_storage = storage(checkout_dir)
-    changelog_entry = debian_linux.read_changelog(checkout_dir)[0]
-    package_name = changelog_entry['Source']
-    package_version = changelog_entry['Version']['upstream']
-    package = "%s-%s" % (package_name, package_version)
-    package_dir = "gen/%s" % package
-    package_orig_tar = "%s_%s.orig.tar.gz" % (package_name, package_version)
-    buildwithsource = False
+def checkout(path, entry):
+    sys.stdout.write("Updating %s ...\n" % (path))
+    sys.stdout.flush()
+    base = entry['base']
+
+    checkout_dir = os.path.join(base, "checkout-" + path.replace('/', '_'))
+    last_file = os.path.join(base, "last-" + path.replace('/', '_'))
+
+    checkout_storage = repository_svn(checkout_dir, "%s/%s" % (entry['repository'], path))
 
     for line in os.popen("svn info %s" % checkout_dir, 'r').read().split('\n'):
         if line.startswith('Last Changed Rev: '):
@@ -157,56 +169,78 @@
 
     last_revision = 0
     last_upstream = None
+    #print last_file
     if os.path.exists(last_file):
         i = file(last_file).read().strip()
         last_revision, last_upstream = i.split()
         last_revision = int(last_revision)
-    if not os.path.exists("out"):
-        os.makedirs("out" , 0755)
 
     if revision <= last_revision:
-        return True
-
-    sys.stdout.write("Processing %s (%s)...\n" % (path,dist))
+        return (0,0)
+    return (revision, last_upstream)
+
+def package(path, dist, revision, last_upstream, entry):
+    base = entry['base']
+    native = entry.get('native', False)
+    dist_version = entry['version_' + dist]
+
+    checkout_dir = os.path.join(base, "checkout-" + path.replace('/', '_'))
+    checkout_storage = storage(checkout_dir)
+    gen_dir = os.path.join(base, 'gen')
+    out_dir = os.path.join(base, 'out')
+    last_file = os.path.join(base, "last-" + path.replace('/', '_'))
+
+    changelog_entry = debian_linux.Changelog(checkout_dir)[0]
+    package_name = changelog_entry.source
+    package_version = changelog_entry.version.upstream
+    package = "%s-%s" % (package_name, package_version)
+    package_dir = os.path.join(gen_dir, package)
+    package_orig = "%s_%s.orig.tar.gz" % (package_name, package_version)
+    if not os.path.exists(out_dir):
+        os.makedirs(out_dir , 0755)
+    sys.stdout.write("Processing %s (rev. %d, %s)...\n" % (path, revision, dist))
     sys.stdout.flush()
-    version_upstream = changelog_entry['Version']['upstream']
-    version_debian = changelog_entry['Version']['debian']
-    if changelog_entry['Distribution'] in ('stable', 'testing', 'unstable', 'experimental'):
+
+    version_upstream = changelog_entry.version.upstream
+    version_debian = changelog_entry.version.debian
+    if changelog_entry.distribution in ('stable', 'testing', 'unstable', 'experimental'):
         version_debian_delemiter = '.'
-    elif changelog_entry['Distribution'] in ('UNRELEASED',):
+    elif changelog_entry.distribution in ('UNRELEASED',):
         version_debian_delemiter = '~'
     else:
         raise "Unknown distribution"
 
     package_storage = checkout_storage.copy(package_dir, storage)
     try:
-        os.symlink("../tarballs", "gen/tarballs")
+        os.symlink("../tarballs", gen_dir + "/tarballs")
     except OSError: pass
-    if version_debian != None:
-      if not os.path.isfile(base + "/tarballs/" + package_orig_tar):
+
+    if not native:
+      if not os.path.isfile(base + "/tarballs/" + package_orig):
         spawnv_chdir(os.P_WAIT, "debian/rules", ['debian/rules', 'get-orig-source'], checkout_dir)
-        buildwithsource = True
-      #print "Checking tarball %s ..." % ('../tarballs/' + package_orig_tar,)
-      if not os.path.isfile(base + "/tarballs/" + package_orig_tar):
-        print "No tarball fetched. Will try fresh download next time."
+      #print "Checking tarball %s ..." % ('../tarballs/' + package_orig)
+      if not os.path.isfile(base + "/tarballs/" + package_orig):
+        sys.stdout.write("No tarball fetched. Will try fresh download next time.")
         return False
-      if os.spawnv(os.P_WAIT, "/bin/gzip", [ 'gzip', '-t', base + '/tarballs/' + package_orig_tar]):
-        print "Tarball invalid! Removing. Will try fresh download next time."
-        os.unlink(base + '/tarballs/' + package_orig_tar)
+      if os.spawnv(os.P_WAIT, "/bin/gzip", [ 'gzip', '-t', base + '/tarballs/' + package_orig]):
+        sys.stdout.write("Tarball invalid! Removing. Will try fresh download next time.")
+        os.unlink(base + '/tarballs/' + package_orig)
         return False
       #else:
       #  print "Tarball valid."
-      suffices = '.diff.gz', '.dsc', '_source.changes'
+
+      # continue with linking that tarball where it's needed.
+      try:
+          os.unlink(os.path.join(gen_dir, package_orig))
+      except OSError: pass
+      try:
+          os.unlink(os.path.join(out_dir, package_orig))
+      except OSError: pass
+
       version_debian += "%c%s.%d" % (version_debian_delemiter, dist_version, revision)
       version_debian_prefix = '-'
-      if not os.path.isfile("out/%s" % package_orig_tar):
-        try:
-          os.symlink("../tarballs/" + package_orig_tar, "out/%s" % package_orig_tar)
-        except OSError: pass
     else:
       #print "Native debian, no source needed."
-      buildwithsource = True
-      suffices = '.tar.gz', '.dsc', '_source.changes'
       version_debian = "%c%s.%d" % (version_debian_delemiter, dist_version, revision)
       version_debian_prefix = ''
 
@@ -224,14 +258,15 @@
     f.write("""\
 %s (%s%s%s) %s; urgency=low
 
-  * SVN snapshot for the pkg-gnome team%s.
-    Mail pkg-gnome-maintainers at lists.alioth.debian.org in case of problems.
-
- -- Kilian Krause <kilian at debian.org>  %s
+  * %s
+
+ -- %s  %s
 
 """ % (
-        package_name, changelog_entry['Version']['source'], version_debian_prefix,
-        version_debian, 'pkg-gnome-' + dist, text_backport,
+        package_name, package_version, version_debian_prefix,
+        version_debian, entry['project'] + '-' + dist, 
+        entry['changelog_text'] + text_backport,
+        entry['changelog_maintainer'],
         time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()),
     )
 )
@@ -239,263 +274,63 @@
     del f
 
     svn_pkg = os.path.expanduser("~/bin/svn-pkg")
-    list = ['svn-pkg', '-k63FA8478', '-S', '-d', '--svn-ignore', '-rfakeroot', '--svn-noninteractive']
-    if buildwithsource:
-        spawnv_chdir(os.P_WAIT, svn_pkg, list + ['-sa'], package_dir)
-        buildwithsource = False
-    else:
-        spawnv_chdir(os.P_WAIT, svn_pkg, list + ['-sd'], package_dir)
-
-    for suffix in (suffices):
+    list = ['svn-pkg', '-S', '-d', '--svn-ignore', '-rfakeroot', '--svn-noninteractive']
+    sign = entry.get('sign', None)
+    if sign:
+        list.append('-k%s' % sign)
+    if not native:
+        if version_upstream != last_upstream:
+            list.append('-sa')
+        else:
+            list.append('-sd')
+    spawnv_chdir(os.P_WAIT, svn_pkg, list + ['-sa'], package_dir)
+    suffices = ['.dsc', '_source.changes']
+    if native:
+        suffices.append('.tar.gz')
+    else:
+        suffices.append('.diff.gz')
+
+    for suffix in suffices:
         prefix = '%s_%s%s%s' % (package_name, package_version, version_debian_prefix, version_debian)
-        #print "Moving: %s%s" % (prefix, suffix)
-        os.link("gen/build-area/%s%s" % (prefix, suffix), "out/%s%s" % (prefix, suffix))
-        os.unlink("gen/build-area/%s%s" % (prefix, suffix))
+        gen = os.path.join(gen_dir, "build-area/%s%s" % (prefix, suffix))
+        out = os.path.join(out_dir, "%s%s" % (prefix, suffix))
+        os.link(gen, out)
+        os.unlink(gen)
 
     #print "Moved all resulting files to out."
     file(last_file, 'w').write("%d %s\n" % (revision, version_upstream))
 
     #print "Cleaning up."
     package_storage.remove()
+    package_storage._rm(gen_dir + "/build-area")
 
     #print "Uploading."
-    spawnv_chdir(os.P_WAIT, 'dupload', ['dupload', '--to', 'seraph', '%s_%s%s%s_source.changes' % (package_name, package_version, version_debian_prefix, version_debian)], "out")
-    #print "Done with %s_%s-%s.\n\n" % (package_name,package_version,version_debian)
+    spawnv_chdir(os.P_WAIT, 'dupload', ['dupload', '--to', entry['upload'], '%s_%s%s%s_source.changes' % (package_name, package_version, version_debian_prefix, version_debian)], "out")
     return True
 
 def main():
-    maps_dists = {
-        "desktop/unstable/atk1.0":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/at-spi":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/bug-buddy":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/control-center":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/dasher":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/eel2":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/ekiga":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/eog": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/epiphany-browser":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/evince":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/file-roller": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gail":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gcalctool":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gconf2":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gconf-editor":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gedit":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/glade":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/glib2.0":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-applets":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-backgrounds":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-common":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-desktop":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-doc-utils":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-games": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-games-extra-data":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-icon-theme":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-keyring":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-keyring-manager":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-mag":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-media": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnomemeeting":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-menus": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-mime-data":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-netstatus":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-nettool":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-panel": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-python":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-python-desktop":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-screensaver":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-session":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-system-monitor":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-system-tools":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-terminal":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-themes":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-user-docs":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-utils": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gnome-vfs2":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gok": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gtk+2.0":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gtk2-engines":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gtk-doc":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gtksourceview":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/gucharmap":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/intltool":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libart-lgpl": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libbonobo":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libbonoboui": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libcroco":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgail-gnome":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libglade2":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgnomecanvas":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgnome":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgnomeprint":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgnomeprintui":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgnomeui":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgtkhtml2": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libgtop2":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/librsvg":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libsoup":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libwnck":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/libxklavier": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/metacity":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/meta-gnome2": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/nautilus-cd-burner":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/nautilus":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/pango1.0":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/pessulus":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/pygobject":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/pygtk":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/pyorbit":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/sabayon":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/sound-juicer":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/startup-notification":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/system-tools-backends":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/totem":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/vino":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/vte": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/yelp":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/unstable/zenity":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/alleyoop":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/balsa":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/brasero":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/clearlooks": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/contact-lookup-applet":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/devhelp":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/devilspie":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/doc-gnome-hig":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/epiphany-extensions":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gaim":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gamin":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gazpacho":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gdesklets-data":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gdesklets":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gdm-themes": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/ghex":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gksu":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/glabels":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-bluetooth":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-cups-manager": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-hearts":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-mud":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-python-extras":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-spell":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gnome-themes-extras":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gossip":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gtetrinet":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gtodo-applet":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gtodo":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gtranslator":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gweled":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gwget2":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/gyrus":      ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/industrial-cursor-theme":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/leafpad":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgda2":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgksu1.2": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgksu":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgksuui1.0":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgnetwork":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgnomecups":       ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgnomedb": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/libgnomesu": ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/loudmouth":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/mergeant":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/mozilla-bonobo":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/nautilus-actions":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/nautilus-sendto":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/netspeed":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/notification-daemon":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/rhythmbox":  ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/shared-mime-info":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/tsclient":   ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/update-manager":     ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/update-notifier":    ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "packages/unstable/xchat-gnome":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "tools/gnome-pkg-tools":        ("ubuntu-dapper", "ubuntu-feisty", "ubuntu-edgy", "debian-sid", "debian-etch", "debian-sarge"),
-        "desktop/experimental/bug-buddy":       ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/control-center":  ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/eel2":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/ekiga":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/epiphany-browser":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/evince":  ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/file-roller":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gail":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gedit":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/glade-3": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/glib2.0": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-applets":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-desktop":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-media":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-nettool":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-python":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-python-desktop":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-screensaver":       ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-session":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-system-monitor":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-terminal":  ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-themes":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-utils":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gnome-vfs2":      ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gtk+2.0": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/gtk2-engines":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libbonobo":       ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libbonoboui":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libgnomeprint":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libgnomeprintui": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libgnomeui":      ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libgtop2":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/librsvg": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libwnck": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/libxklavier":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/metacity":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/nautilus-cd-burner":      ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/nautilus":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/pessulus":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/pygobject":       ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/pygtk":   ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/pyorbit": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/sound-juicer":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/vte":     ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/yelp":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "desktop/experimental/zenity":  ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/brasero":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/epiphany-extensions":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/gossip": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/libgda2":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/libgda3":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/nautilus-python":        ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/rhythmbox":      ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/update-manager": ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-        "packages/experimental/xchat-gnome":    ("ubuntu-dapper-experimental", "ubuntu-feisty-experimental", "ubuntu-edgy-experimental", "debian-sid-experimental", "debian-etch-experimental", "debian-sarge-experimental"),
-    }
-    maps_version = {
-        "debian-etch": "etch",
-        "debian-sarge": "sarge",
-        "debian-sid": "sid",
-        "ubuntu-feisty": "feisty",
-        "ubuntu-edgy": "edgy",
-        "ubuntu-dapper": "dapper",
-        "debian-etch-experimental": "etch+experimental",
-        "debian-sarge-experimental": "sarge+experimental",
-        "debian-sid-experimental": "sid+experimental",
-        "ubuntu-feisty-experimental": "feisty+experimental",
-        "ubuntu-edgy-experimental": "edgy+experimental",
-        "ubuntu-dapper-experimental": "dapper+experimental",
-    }
     if len(sys.argv) > 1:
-        paths = sys.argv[1:]
-    else:
-        paths = maps_dists.keys()
+      config = Config(sys.argv[1])
+    else:
+      sys.stderr.write('package.py config.cfg')
+      return False
+    if len(sys.argv) > 2:
+        paths = sys.argv[2:]
+    else:
+        paths = config.keys()
     for path in paths:
-      checkout(path)
-      try:
-          for dist in maps_dists[path]:
-              if not package(path, dist, maps_version[dist]):
-                  break
-      except:
-          pass
+        try:
+            c = config[path]
+            (revision, last_upstream) = checkout(path, c)
+            revision = int(revision)
+            if (revision > 0):
+              for dist in c['dist']:
+                package(path, dist, revision, last_upstream, c)
+        except Exception, e:
+            import traceback
+            traceback.print_exc()
 
 if __name__ == '__main__':
-    os.chdir(base)
     main()
 
 # vim:set ai et sts=2 sw=2 tw=80:




More information about the pkg-gnome-commits mailing list