[med-svn] r1348 - trunk/community/infrastructure/test

tille at alioth.debian.org tille at alioth.debian.org
Sun Feb 10 07:09:18 UTC 2008


Author: tille
Date: 2008-02-10 07:09:17 +0000 (Sun, 10 Feb 2008)
New Revision: 1348

Modified:
   trunk/community/infrastructure/test/cddtasktools.py
   trunk/community/infrastructure/test/update-tasks
Log:
Package URLs


Modified: trunk/community/infrastructure/test/cddtasktools.py
===================================================================
--- trunk/community/infrastructure/test/cddtasktools.py	2008-02-09 20:37:43 UTC (rev 1347)
+++ trunk/community/infrastructure/test/cddtasktools.py	2008-02-10 07:09:17 UTC (rev 1348)
@@ -86,6 +86,7 @@
         self.responsible    = None # E-Mail address of issuer of ITP or some person
                                    # who volunteered to care for this program
         self.license        = None # License of program
+        self.section        = None # Section of package in the Debian hierarchy
         self.wnpp           = None # WNPP bug number
         self.pkgShortDesc   = None # Prospective packages should have a description ...
         self.pkgLongDesc    = None # ... which could be copied to (or from if exists)
@@ -284,6 +285,10 @@
                                 dep.pkgLongDesc  = self.available.packages[component][dep.pkg].pkgLongDesc
                                 dep.homepage     = self.available.packages[component][dep.pkg].homepage
                                 dep.version      = self.available.packages[component][dep.pkg].version
+                                # TODO: Assuming 'unstable' is wrong --> handle list of dists
+                                dep.pkgURL       = 'http://packages.debian.org/' + 'unstable/' + \
+                                                   self.available.packages[component][dep.pkg].section + \
+                                                   '/' + dep.pkg
                                 break # The same package should be only in one component
                                       # At least I currently see no reason for having a
                                       # package with the same name in main and contrib
@@ -297,6 +302,12 @@
                     else:
                         print >>stderr, "Dep not initiatet before Homepage %s -> something is wrong." \
                               % stanza['homepage']
+                elif key == 'section':
+                    if dep != None:
+                        dep.section  = stanza['section']
+                    else:
+                        print >>stderr, "Dep not initiatet before Section %s -> something is wrong." \
+                              % stanza['license']
                 elif key == 'License':
                     if dep != None:
                         dep.license  = stanza['license']
@@ -405,7 +416,8 @@
                     deppkg.homepage = '#' # Not every package has a homepage tag
                 except:
                     deppkg.homepage = '.' # Something else in case unexpected things happen
-                deppkg.version  = stanza['version']
+                deppkg.version  = stanza['version'].split('-')[0]
+                deppkg.section  = stanza['section']
                 self.packages[component][stanza['package']] = deppkg
             f.close()
 

Modified: trunk/community/infrastructure/test/update-tasks
===================================================================
--- trunk/community/infrastructure/test/update-tasks	2008-02-09 20:37:43 UTC (rev 1347)
+++ trunk/community/infrastructure/test/update-tasks	2008-02-10 07:09:17 UTC (rev 1348)
@@ -104,7 +104,7 @@
 	node.version.content = "Version: %s" % deppkg.version
 	if deppkg.license != None:
 		node.license.content = "License: %s" % deppkg.license
-	node.pkgurl.atts['href'] =  'to be determined' # det[package]['Pkg-URL']
+	node.pkgurl.atts['href'] = deppkg.pkgURL
 	node.pkgurl.content = "Official Debian package"
 	node.deburl.atts['href'] =  'to be determined' # det[package]['Deb-URL']
 	#~ node.deburl.content = "X" ### TODO: add a nice icon here to download the .deb package




More information about the debian-med-commit mailing list