[Sugar-devel] Datastore is broken

Simon Schampijer simon at schampijer.de
Wed Nov 7 11:51:55 EST 2012


On 11/07/2012 02:45 PM, Daniel Narvaez wrote:
> Buildbot tests are failing, apparently  because of a datastore issue
>
> http://buildbot.sugarlabs.org/builders/fedora-17-32bit/builds/656/steps/shell_3/logs/testlogs
>
> I verified I get the same issue with a normal run on my laptop, as
> long as I use a clean profile. (the shell shows an empty home briefly
> and then dies). Ignacio is also seeing something similar.
>
> Going back to 0.97.1 fixes it.
>

Thanks for the ping. Sorry I did not catch that in my testing, I did not 
test with an empty datastore :(

The regression go introduced in the last commit: 
http://git.sugarlabs.org/sugar-datastore/mainline/commit/adaf1d0d4bd536e24b7c4df8fd38f80f5b23850f

We fail because we try to access the index at the final path, but at 
this point we created it at the temp path only. The following patch does 
work for me.

diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py
index a859dfe..d9bd56b 100644
--- a/src/carquinyol/datastore.py
+++ b/src/carquinyol/datastore.py
@@ -171,8 +171,7 @@ class DataStore(dbus.service.Object):
                                              temp_index_path])
          index_du = int(index_du.split('\t')[0])
          # disk available, in bytes
-        index_path = layoutmanager.get_instance().get_index_path()
-        stat = os.statvfs(index_path)
+        stat = os.statvfs(temp_index_path)
          da = stat.f_bavail * stat.f_bsize
          if da > (index_du * 1.2) and da > MIN_INDEX_FREE_BYTES: # 20% 
room for growth
              logger.warn('Attempting to move tempfs index to disk')


Would be great if Martin as the author of the patch could acknowledge.

Regards,
    Simon



More information about the Sugar-devel mailing list