library-web r363 - in trunk: . src



Author: fpeters
Date: Sat Jan 12 15:30:53 2008
New Revision: 363
URL: http://svn.gnome.org/viewvc/library-web?rev=363&view=rev

Log:
* src/lgo.py: added looking up of devel modules that are not shipped in
any GNOME release.



Modified:
   trunk/ChangeLog
   trunk/src/lgo.py

Modified: trunk/src/lgo.py
==============================================================================
--- trunk/src/lgo.py	(original)
+++ trunk/src/lgo.py	Sat Jan 12 15:30:53 2008
@@ -1438,6 +1438,13 @@
             moduleset = self.ftp_gnome_org.download(url % {'r': r})[1]
             self.process_moduleset(moduleset, r)
 
+            if self.config.version_max is None and r == releases[-1]:
+                # this is the last release, and no maximum version was set,
+                # add all modules to extra tarballs, so development versions
+                # not shipped with latest GNOME are made available.
+                moduleset.seek(0)
+                self.process_latest_moduleset(moduleset)
+
     def download(self, url):
         if url.startswith('gnome://'):
             # special schema for modules on ftp.gnome.org; URL scheme is
@@ -1539,6 +1546,28 @@
                         doc_module, version_number))
             doc_module.process()
 
+
+    def process_latest_moduleset(self, moduleset):
+        '''Register all modules from latest modulesets as extra tarballs
+           with minimum version set to version+epsilon'''
+        tree = ET.parse(moduleset)
+        for tarball in tree.findall('tarball'):
+            if self.config.modules is not None and not tarball.attrib['id'] in self.config.modules:
+                continue
+
+            url = tarball.find('source').attrib['href']
+            if not (url.startswith('http://download.gnome.org/') or
+                    url.startswith('http://ftp.gnome.org/')):
+                continue
+            min_version = tarball.attrib.get('version')
+            if not min_version:
+                continue
+            min_version += '.1'
+            logging.info('registering module %s for extra tarballs' % tarball.attrib['id'])
+            extra_tarball = 'gnome://%s?min=%s' % (tarball.attrib['id'], min_version)
+            print extra_tarball
+            self.config.extra_tarballs.append(extra_tarball)
+
     def extract_modules(self, filename):
         logging.debug('looking for doc modules in %s' % filename)
         doc_modules = []



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]