jhbuild r2602 - in trunk: . jhbuild/commands



Author: fpeters
Date: Fri Dec 26 11:31:41 2008
New Revision: 2602
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2602&view=rev

Log:
* jhbuild/commands/base.py: display updated bootstrap modules when
checking the bootstrap moduleset changes.  (closes: #565355)



Modified:
   trunk/ChangeLog
   trunk/jhbuild/commands/base.py

Modified: trunk/jhbuild/commands/base.py
==============================================================================
--- trunk/jhbuild/commands/base.py	(original)
+++ trunk/jhbuild/commands/base.py	Fri Dec 26 11:31:41 2008
@@ -179,7 +179,7 @@
     packagedb = jhbuild.frontends.get_buildscript(config, []).packagedb
 
     max_install_date = max([
-            packagedb.installdate(module.name, module.get_revision() or '')
+            packagedb.installdate(module.name)
             for module in module_set.modules.values()])
 
     if max_install_date is None:
@@ -187,15 +187,29 @@
         # to use it
         return
 
+    updated_modules = []
+    for module in module_set.modules.values():
+        if not packagedb.entries.has_key(module.name):
+            continue
+        p_version = packagedb.entries.get(module.name)[0]
+        if p_version != module.get_revision():
+            updated_modules.append(module.name)
+
     bootstrap_uri = os.path.join(os.path.dirname(__file__), '../../modulesets/bootstrap.modules')
     bootstrap_mtime = os.stat(bootstrap_uri)[stat.ST_MTIME]
 
-    if max_install_date > bootstrap_mtime:
-        return
-
-    print >> sys.stderr, uencode(
-            _('I: bootstrap moduleset has been updated since the last time '\
-              'you used it, perhaps you should run jhbuild bootstrap.'))
+    if max_install_date <= bootstrap_mtime:
+        # general note, to cover added modules
+        print >> sys.stderr, uencode(
+                _('I: bootstrap moduleset has been updated since the last time '\
+                  'you used it, perhaps you should run jhbuild bootstrap.'))
+
+    if updated_modules:
+        # note about updated modules
+        print >> sys.stderr, uencode(
+                _('I: some bootstrap modules have been updated, '\
+                  'perhaps you should update them: %s.') % \
+                  ', '.join(updated_modules))
 
 
 class cmd_build(Command):



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