[library-web] add handling of reorganized modulesets



commit af0accb710b398fd946f0b7ad56a293b18283d8b
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat Mar 19 23:18:39 2011 +0100

    add handling of reorganized modulesets

 src/lgo.py |   35 ++++++++++++++++++++++-------------
 1 files changed, 22 insertions(+), 13 deletions(-)
---
diff --git a/src/lgo.py b/src/lgo.py
index 2cfc070..a9c97bf 100755
--- a/src/lgo.py
+++ b/src/lgo.py
@@ -222,21 +222,28 @@ class Lgo(App):
                     continue
 
             if version_cmp(r, '2.19.0') < 0:
-                url = 'pub/GNOME/teams/releng/%(r)s/gnome-%(r)s.modules'
+                urls = ['pub/GNOME/teams/releng/%(r)s/gnome-%(r)s.modules']
+            if version_cmp(r, '2.91.3') < 0:
+                urls = ['pub/GNOME/teams/releng/%(r)s/gnome-suites-%(r)s.modules']
             else:
-                # from 2.19.0, the jhbuild moduleset structure changed
-                url = 'pub/GNOME/teams/releng/%(r)s/gnome-suites-%(r)s.modules'
+                urls = ['pub/GNOME/teams/releng/%(r)s/gnome-apps-%(r)s.modules',
+                        'pub/GNOME/teams/releng/%(r)s/gnome-suites-core-%(r)s.modules',
+                        'pub/GNOME/teams/releng/%(r)s/gnome-suites-core-deps-%(r)s.modules']
 
             logging.info('Getting GNOME release: %s' % r)
-            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)
+            for url in urls:
+                try:
+                    moduleset = self.ftp_gnome_org.download(url % {'r': r})[1]
+                except Exception, e:
+                    logging.error('Failed retrieving %s (%s)' % (url % {'r': r}, str(e)))
+                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://'):
@@ -348,6 +355,9 @@ class Lgo(App):
             hrefs.append((module, href))
 
         for module, href in hrefs:
+            if not (href.startswith('http://download.gnome.org/') or
+                    href.startswith('http://ftp.gnome.org/')):
+                continue
             filename = self.download(href)
             if not filename:
                 continue
@@ -377,7 +387,6 @@ class Lgo(App):
                         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'''



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