[med-svn] r1968 - trunk/community/infrastructure/scripts

tille at alioth.debian.org tille at alioth.debian.org
Wed Jun 4 14:39:42 UTC 2008


Author: tille
Date: 2008-06-04 14:39:41 +0000 (Wed, 04 Jun 2008)
New Revision: 1968

Modified:
   trunk/community/infrastructure/scripts/cddtasktools.py
   trunk/community/infrastructure/scripts/update-tasks
Log:
Add Debian Junior


Modified: trunk/community/infrastructure/scripts/cddtasktools.py
===================================================================
--- trunk/community/infrastructure/scripts/cddtasktools.py	2008-06-04 11:57:33 UTC (rev 1967)
+++ trunk/community/infrastructure/scripts/cddtasktools.py	2008-06-04 14:39:41 UTC (rev 1968)
@@ -29,12 +29,14 @@
 REPOS    = { 'debian-med'     : SVNHOST+"/svn/cdd/projects/med/trunk/debian-med/tasks/",
              'debian-edu'     : SVNHOST+"/svn/debian-edu/trunk/src/debian-edu/tasks/",
              'debian-gis'     : SVNHOST+"/pkg-grass/packages/debian-gis/tasks/",
+             'debian-junior' : SVNHOST+"/svn/cdd/projects/junior/trunk/debian-junior/tasks/",
              'debian-science' : SVNHOST+"/svn/cdd/projects/science/trunk/debian-science/tasks/",
            }
 HTMLBASE = "/var/lib/gforge/chroot/home/groups"
 DATADIR  = { 'debian-med'     : HTMLBASE+"/debian-med/data/",
              'debian-edu'     : HTMLBASE+"/cdd/data/edu/",
              'debian-gis'     : HTMLBASE+"/cdd/data/gis/",
+             'debian-junior'  : HTMLBASE+"/cdd/data/junior/",
              'debian-science' : HTMLBASE+"/cdd/data/science/",
            }
 KEYSTOIGNORE = ( 'Architecture', 'Leaf', 'NeedConfig', 'Note', 'Section' )
@@ -95,17 +97,6 @@
         LongDesc += "</pre>\n"
     return (ShortDesc, LongDesc)
 
-
-class Task:
-    # This class just stores name and description of a task package
-    # FIXME: This is probably not used anymore and can be deleted
-
-    def __init__(self, cddname=None, taskname=None, shortDesc=None, longDesc=None):
-        self.cddname        = cddname
-        self.taskname       = taskname
-        self.shortDesc      = shortDesc
-        self.longDesc       = longDesc
-
 class DependantPackage:
     # Hold information about a program that is in dependency list
     # The 
@@ -346,6 +337,17 @@
         self.taskShortDesc   = None
         self.taskLongDesc    = None
 
+        # If a CDD just bases on the meta package of an other CDD (this is the
+        # case in Debian Science which bases on med-bio for biology and gis-workstation
+        # for geography it makes no sense to build an own sentinel page but read
+        # meta package information of other meta packages and include the content
+        # of these while enabling to add further Dependencies as well
+        #
+        # metadepends should be a SVN URL
+        #
+        # This is NOT YET implemented
+        self.metadepends     = None
+
     def GetTaskDependencies(self):
         # First obtain information about Packages
         # available in Debian
@@ -369,6 +371,8 @@
                 if key == 'Description':
                     (self.taskShortDesc, self.taskLongDesc) = SplitDescription(stanza['description'])
                     continue
+                if key == 'Meta-Depends':
+                    self.metadepends = stanza['meta-depends']
                 if key == 'Why':
                     why = stanza['why']
                     continue
@@ -441,7 +445,7 @@
                     continue
                 # The following keys will be mostly used for programs that
                 # are not yet existing in Debian and will go to our todo list
-                if key == 'homepage':
+                if key == 'Homepage':
                     if dep != None:
                         dep.homepage = stanza['homepage']
                     else:

Modified: trunk/community/infrastructure/scripts/update-tasks
===================================================================
--- trunk/community/infrastructure/scripts/update-tasks	2008-06-04 11:57:33 UTC (rev 1967)
+++ trunk/community/infrastructure/scripts/update-tasks	2008-06-04 14:39:41 UTC (rev 1968)
@@ -28,6 +28,7 @@
 OUTPUTDIR = { 'debian-med'     : HTMLBASE+"/debian-med/static/tasks/",
               'debian-edu'     : HTMLBASE+"/cdd/htdocs/edu/tasks/",
               'debian-gis'     : HTMLBASE+"/cdd/htdocs/gis/tasks/",
+              'debian-junior'  : HTMLBASE+"/cdd/htdocs/junior/tasks/",
               'debian-science' : HTMLBASE+"/cdd/htdocs/science/tasks/",
             }
 TEMPLATEDIR = "/var/lib/gforge/chroot/home/groups/debian-med/htdocs/"
@@ -230,12 +231,18 @@
 if not os.access(OUTPUTDIR[CDD], os.W_OK):
 	try:
 		os.makedirs(OUTPUTDIR[CDD])
+		print "Created output dir " + OUTPUTDIR[CDD]
 	except:
 		print >> stderr, "Unable to create output directory", OUTPUTDIR[CDD]
 
 outputfile = OUTPUTDIR[CDD] + "index.php"
 # Remove the file first, to enable other users to change permissions easily
-os.unlink(outputfile)
+try:
+	os.unlink(outputfile)
+except:
+        # don't fail if there is nothing to remove (if a new CDD get's added)
+        pass
+
 f = open(outputfile, "w")
 
 tasks        = cdeps.tasknames




More information about the debian-med-commit mailing list