Re: [Sugar-devel] Making OLPC / Sugar Labs more approachable (was: Re: OLPC 10.1.2 Release Candidate 1)

2010-08-09 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 5:09 PM, Christoph Derndorfer wrote: > I know I'm repeating myself here but I find the attitude expressed in these > instructions and particularly point 3 troublesome and a continued source of > frustration for me as well as other people I've talked to. Even more so I > thin

Re: [Sugar-devel] Making OLPC / Sugar Labs more approachable

2010-08-09 Thread Martin Langhoff
On Mon, Aug 9, 2010 at 4:17 PM, Neil Graham wrote: > And yet, Developers on this list [olpc-devel] have complained when > people have done that, because this is not the place for it.  Of course, > there isn't any other place for it. Don't take every complaint seriously ;-) > I really don't want

Re: [Sugar-devel] [Dextrose] Stability stuff

2010-09-03 Thread Martin Langhoff
On Fri, Sep 3, 2010 at 11:23 AM, Martin Abente wrote: > for sugar. In the field you already know thats not the case. Also... even > when > the activities are being implemented in python through the Activity Class, > the > read and write methods needs to be implemented by the programmer. That > mea

Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-03 Thread Martin Langhoff
On Fri, Sep 3, 2010 at 12:43 PM, Tomeu Vizoso wrote: > I have a local XS 0.6 that is working fine but I'm finding that the XS > 0.5.2 at jabber.sugarlabs.org is not returning some results for some > of the queries that I make. There are very important bugfixes in the "final" ejabberd that is in o

Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-07 Thread Martin Langhoff
On Tue, Sep 7, 2010 at 10:44 AM, Tomeu Vizoso wrote: > With the script attached, some GetProperties queries take a few > seconds, others more than 25 seconds (the default dbus timeout). It > should be invoked like this: dbus-launch --exit-with-session python > gabble_test.py Hmmm, great that we h

Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-08 Thread Martin Langhoff
On Wed, Sep 8, 2010 at 5:02 AM, Tomeu Vizoso wrote: > Note that those are registered users, there's only a dozen online. Ah! Then no, the behaviour is 100% bogus. > I guess in that case you won't accumulate lots of registered users > either, so this behavior shouldn't matter in the field. Well,

Re: [Sugar-devel] #2141 UNSP: Memory and CPU status indicator for the frame.

2010-09-15 Thread Martin Langhoff
On Wed, Sep 15, 2010 at 6:59 AM, Tomeu Vizoso wrote: > As said in the ticket, in some systems regardless of the load the face > would be always happy or always sad. I expect users to be confused > about this. That's a very reasonable concern from the Sugar PoV. In tandem with this... are we cons

Re: [Sugar-devel] #2141 UNSP: Memory and CPU status indicator for the frame.

2010-09-15 Thread Martin Langhoff
On Wed, Sep 15, 2010 at 11:36 AM, Benjamin M. Schwartz wrote: > I don't think this is a good enough heuristic. Agreed -- that's a terrible heuristic. And happy/sad face is a terrible "UI". The computer is not happy or sad; it's _working_. Honestly, there is a base problem here: "simplifying" thi

Re: [Sugar-devel] What should system mood really mean? (forked from #2141 UNSP: Memory and CPU status indicator for the frame.)

2010-09-15 Thread Martin Langhoff
On Wed, Sep 15, 2010 at 10:53 AM, Anish Mangal wrote: > How about extending the meaning of 'system mood' to more than just the > memory and cpu usage metrics. As I've mentioned in the other thread, this is not a good metaphor. If you have a box, as long as things _fit_ in it, you're ok. An almos

Re: [Sugar-devel] [IAEP] Child in charge of FOSS or Sugar

2010-09-17 Thread Martin Langhoff
On Fri, Sep 17, 2010 at 9:27 AM, Søren Hougesen wrote: > For about a month ago, I asked as a curious outsider, if kids were actually > hacking sugar. Two factors are important here: - We all have very high and complex expectations for Sugar, so Sugar itself is internally complex; and that trend

Re: [Sugar-devel] flashing time xo-1.5

2010-09-17 Thread Martin Langhoff
Hi Esteban, we had exactly the same question asked by Guadalupe :-) -- Wad posted our answers / notes on de...@lists.laptop.org earlier today. [ It has nothing to do with Dextrose, and everything to do with the size of the image and the write speed of the SD card... ] In that thread you'll find

Re: [Sugar-devel] [IAEP] Child in charge of FOSS or Sugar

2010-09-21 Thread Martin Langhoff
On Tue, Sep 21, 2010 at 9:21 AM, Teemu Leinonen wrote: > The issue is even more important when the project is claiming to > promote FLOSS culture, like in the case of Sugar. In my definition of That is _not_ the primary goal of Sugar. Sugar aims for lots of goals, first and foremost, is about chi

Re: [Sugar-devel] Fwd: Running "pulseaudio" and "alsa" together.

2012-06-04 Thread Martin Langhoff
Hi Ajay, we install the bits for PA (due to dependencies), but disable it. Look at olpc-os-builder; git grep for pulse -- that will show you how we disable it. Alsa is always present and in use. When you are using PA, PA connects to alsa and uses it directly. Nomal programs then connect to PA (in

Re: [Sugar-devel] Patch written for "Presence not updated, when client disconencts from telepathy-salut"

2012-07-09 Thread Martin Langhoff
On Mon, Jul 9, 2012 at 8:33 AM, Ajay Garg wrote: > I have written a patch for "Avahi", that solves the bugs > > [UPSTREAM] http://bugs.sugarlabs.org/ticket/3748 > [DOWNSTREAM]   http://dev.laptop.org.au/issues/1332 Thanks for working on this. Neither link has a patch. Where is the patch,

Re: [Sugar-devel] Patch written for "Presence not updated, when client disconencts from telepathy-salut"

2012-07-09 Thread Martin Langhoff
On Mon, Jul 9, 2012 at 10:49 AM, Ajay Garg wrote: > The patch link was embedded later into the email :: > http://people.sugarlabs.org/ajay/root/freedesktop_bug_51501/common-patch-for-f14-and-f17/customize-avahi-default-ttl-values.patch Ah, thanks! Have you shown this patch to Avahi hackers? Avah

Re: [Sugar-devel] Patch written for "Presence not updated, when client disconencts from telepathy-salut"

2012-07-09 Thread Martin Langhoff
On Mon, Jul 9, 2012 at 12:30 PM, Ajay Garg wrote: > Just sent them a notification :) Ok, that's a start. > Reason is that, because "avahi-daemon" requires "avahi-core" to complete its > linking process, whereas "avahi-core" would need "avahi-daemon" to complete > its linking process (since the t

Re: [Sugar-devel] Patch written for "Presence not updated, when client disconencts from telepathy-salut"

2012-07-10 Thread Martin Langhoff
On Tue, Jul 10, 2012 at 4:18 AM, Ajay Garg wrote: > More update (from Avahi) : > http://www.mail-archive.com/avahi@lists.freedesktop.org/msg01896.html So perhaps Telepathy-Salut should be told to contact its known nodes regularly, and prune stale entries? As they state, mDNS & DNS-SD are in use

Re: [Sugar-devel] [Dextrose] Patch written for "Presence not updated, when client disconencts from telepathy-salut"

2012-07-10 Thread Martin Langhoff
On Tue, Jul 10, 2012 at 10:13 AM, Ajay Garg wrote: >> So perhaps Telepathy-Salut should be told to contact its known nodes >> regularly, and prune stale entries? > Don't know if that would make a difference, because either ways, a machine > would send a (polling) signal to all the machines on the

Re: [Sugar-devel] Engadget post on XO Touch

2012-08-01 Thread Martin Langhoff
On Thu, Jul 26, 2012 at 11:21 PM, Mike Lee wrote: > Here's a cool demo of the Neonode multitouch frame: > http://www.slashgear.com/neonode-3d-touch-headed-to-tablets-and-phones-hands-on-28215933/ > Not only multi-touch, but also entry direction and tilt. For a dollar! Not all devices using Neonod

Re: [Sugar-devel] Simulate mouse click

2012-08-10 Thread Martin Langhoff
On Fri, Aug 10, 2012 at 10:26 AM, Rodrigo Pérez Fulloni wrote: > Hi, I'm developing an accessibility activity to move the mouse with > alternative methods. I already have one developed, hMouse. But then and now > I can't find a way to simulate the mouse click, pygame hasn't the ability > and I can

Re: [Sugar-devel] Unicode strings in translations

2012-08-13 Thread Martin Langhoff
On Mon, Aug 13, 2012 at 12:35 PM, Manuel Kaufmann wrote: > To get Unicode strings from gettext I had to put these lines in my > lesssonscreen.py file: > > import gettext > gettext.install('po', unicode=True) Awright. Seems like gettext hasn't realized that it's 2012 and defaults to using codepage

Re: [Sugar-devel] Unicode strings in translations

2012-08-14 Thread Martin Langhoff
On Mon, Aug 13, 2012 at 7:15 PM, S. Daniel Francis wrote: > I look some people is needing to know more about Unicode: Hi danielf, one thing to keep in mind is that UTF-8 is one of the possible ways to represent Unicode data. We will, most of the time, use UTF-8 mixed up with straight old ASCII.

Re: [Sugar-devel] Unicode strings in translations

2012-08-14 Thread Martin Langhoff
On Tue, Aug 14, 2012 at 5:18 PM, S. Daniel Francis wrote: >>> strings as Unicode and encode them as utf-8? I think there are too few >>> cases when an activity gets translated strings and needs to work >>> directly with unicode. >> >> >> Probably because you do not speak chinese or any other asian

Re: [Sugar-devel] Unicode strings in translations

2012-08-15 Thread Martin Langhoff
On Wed, Aug 15, 2012 at 9:20 AM, Manuel Kaufmann wrote: > Oh, it's OK. I agree with the result. Now, let's check what Python say > if I use my default encoding (UTF8) for this simple task: > len("camión") > 7 CAREFUL HERE. You don't understand what is happening -- it is not as simple as you

Re: [Sugar-devel] Unicode strings in translations

2012-08-15 Thread Martin Langhoff
On Wed, Aug 15, 2012 at 9:48 AM, Daniel Narvaez wrote: > I think the reason this worked in gtk2 activities is that importing > gtk had this side effect (it's in the pango module really) > > /* set the default python encoding to utf-8 */ > PyUnicode_SetDefaultEncoding("utf-8"); Oh, can you

Re: [Sugar-devel] Unicode strings in translations

2012-08-15 Thread Martin Langhoff
On Wed, Aug 15, 2012 at 11:40 AM, S. Daniel Francis wrote: > So, the Python strings can be encoded in a Unicode compatible charset > like utf-8, the Python Unicode type is a way to encode a string if you > don't like to add a header and the recommended way to work in the > program internally, so y

Re: [Sugar-devel] Unicode strings in translations

2012-08-15 Thread Martin Langhoff
On Wed, Aug 15, 2012 at 7:12 PM, Manuel Kaufmann wrote: > Take a look at this. Following what I understood from your email, if I ... We are veering far far offtopic from the subject. But string encoding is an important topic, so I'll go offtopic. > [humitos@michifus ~]$ cat test.py > #!/usr/bin/

Re: [Sugar-devel] Unicode strings in translations

2012-08-16 Thread Martin Langhoff
On Thu, Aug 16, 2012 at 9:29 AM, Benjamin Berg wrote: > Disclaimer: I have not read the entire discussion. and you've missed a bit :-) > So, in Sugar we are mixing python unicode strings, and utf-8 encoded No. We have been _temporarily_ mixing Python unicode UTF-8 with ASCII strings. We used t

Re: [Sugar-devel] Problems starting the XO

2012-09-01 Thread Martin Langhoff
On Sat, Sep 1, 2012 at 4:25 PM, Ajay Garg wrote: > Thanks Chris and Mikus for the replies. Hi Ajay, please ansert cjb's question. It has a good chance of leading to your answer. What deps are you ignoring? Why --force? Also -- /var/log/olpc-dm* logs are likely to have important info. Please pos

Re: [Sugar-devel] Problems starting the XO

2012-09-04 Thread Martin Langhoff
On Tue, Sep 4, 2012 at 3:38 PM, Ajay Garg wrote: > May be this could be improved sometime in the future :) Fix the packaging, and don't use --force. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny s

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-10 Thread Martin Langhoff
On Mon, Sep 10, 2012 at 5:33 PM, Manuel Kaufmann wrote: > If there are less than 50Mb free on the Hard Disk the downloading > process is canceled and this is informed to the user via an Alert. Perhaps it is a stupid question but... in many HTTP requests you get the size of the transfer in the HTT

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-10 Thread Martin Langhoff
On Mon, Sep 10, 2012 at 5:49 PM, Martin Langhoff wrote: > Perhaps it is a stupid question but... in many HTTP requests you get s/question/suggestion/ m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distrac

Re: [Sugar-devel] [DESIGN] set zoom to initial value in Browse

2012-09-10 Thread Martin Langhoff
On Mon, Sep 10, 2012 at 10:07 AM, Gonzalo Odiard wrote: > "Actual size" is used in Read too. http://imgs.xkcd.com/store/imgs/actual_size_200.png m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stu

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-10 Thread Martin Langhoff
On Mon, Sep 10, 2012 at 6:02 PM, Manuel Kaufmann wrote: > On Mon, Sep 10, 2012 at 9:49 PM, Martin Langhoff > wrote: >> Perhaps it is a stupid question but... in many HTTP requests you get >> the size of the transfer in the HTTP headers, in the form of the >> Content-Len

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-10 Thread Martin Langhoff
On Mon, Sep 10, 2012 at 6:39 PM, James Cameron wrote: > Some users pay for data by volume. I don't think that cancelling a > download is the right approach. It should be paused, giving the user > a chance to clean up. Rather complex -- I haven't seen any webbrowser correctly implement that corr

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-11 Thread Martin Langhoff
On Tue, Sep 11, 2012 at 9:01 AM, Manuel Kaufmann wrote: > If we are going to use this approach, I have to change the logic about > "where" I should check this. +200. I hadn't realized this. The main two things you absolutely need are - check at the start of the download that it'll fit (with X r

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-11 Thread Martin Langhoff
On Tue, Sep 11, 2012 at 4:32 PM, Manuel Kaufmann wrote: > I didn't find an exception raised by Sugar when this happens. The > check is done[1] when a new Model is created[2] or updated[3] inside > the Journal, and if there are less than 50Mb a ModelAlert is shown but > no exception is raised. Mayb

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-11 Thread Martin Langhoff
On Tue, Sep 11, 2012 at 9:07 PM, Manuel Kaufmann wrote: > This is what I got: > > [olpc@xo-07-30-50 ~]$ mkdir /tmp/foo > [olpc@xo-07-30-50 ~]$ sudo mount -t tmpfs -o size=1M none /tmp/foo > [olpc@xo-07-30-50 ~]$ python > Python 2.7.3 (default, Apr 30 2012, 23:07:00) > [GCC 4.7.0 20120416 (Red Hat

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-12 Thread Martin Langhoff
On Wed, Sep 12, 2012 at 7:50 AM, Manuel Kaufmann wrote: > I'm attaching an example that downloads a file with WebKit. > > I tried it setting up a tmpfs with 1Mb as you suggested and aftert > that, I ran this script. WebKit tells us about the insufficient space > on the disk by raising the "error"

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-12 Thread Martin Langhoff
On Wed, Sep 12, 2012 at 8:20 AM, Manuel Kaufmann wrote: > OK. I was taking a look at the datastore source code and I understood > that the file is copied, using the traditional way and when the copy > finishes the source file is unlinked. Ouch! I haven't reviewed the code (have to run some person

Re: [Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

2012-09-12 Thread Martin Langhoff
On Wed, Sep 12, 2012 at 8:24 AM, Manuel Kaufmann wrote: > On Wed, Sep 12, 2012 at 9:21 AM, Martin Langhoff > wrote: >> That's very good handling on webkit's side. And does it remove the >> file? IOWs, when you get the signal, what do you see in the tmpfs? Is >&g

[Sugar-devel] Adventures in the land of ENOSPC

2012-09-13 Thread Martin Langhoff
Manuel Kaufmann has been looking at SL#394, and looking at the bug report, it struck me that it was reported backwards. I would have written: "I filled up my disk and it knocked the system out, Sugar would not start again, etc. Oh, btw, it was with Browse". Maybe I'm the only one who thinks this w

Re: [Sugar-devel] Problem downloading a lease.sig file on an XO

2012-09-13 Thread Martin Langhoff
On Wed, Sep 12, 2012 at 9:22 PM, Samuel Greenfeld wrote: >> 1. Is there a security problem/concern with having our project's lease.sig >> file publicly available? (we only generate activations for non-stolen XOs) Should be ok, as long as you're comfortable with the validity period (ie: not too lo

Re: [Sugar-devel] Not enough space adventure

2012-09-18 Thread Martin Langhoff
On Tue, Sep 18, 2012 at 8:42 AM, Manuel Kaufmann wrote: > We where discussing about this last week[1] and we found the "root" > issue of this problem: Sugar is not handling ENOSPC error. This could > cause some problems at boot time when the XO is restarted, but as we > discussed[2], Linux has mad

Re: [Sugar-devel] Adventures in the land of ENOSPC

2012-09-19 Thread Martin Langhoff
On Sat, Sep 15, 2012 at 8:03 AM, Sascha Silbe wrote: > Martin Langhoff writes: > >> Manuel Kaufmann has been looking at SL#394, and looking at the bug >> report, it struck me that it was reported backwards. I would have >> written: "I filled up my disk and it

[Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
I'm debugging odd situations w Sugar datastore, and I wonder whether there is any tricks to debugging python programs that are run under dbus. I can see the sugar-datastore PID growing steadily while I test, which means that it's dying and respawning plenty, likely from unhandled exceptions... th

Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 4:15 PM, Martin Langhoff wrote: > I'm debugging odd situations w Sugar datastore, and I wonder whether > there is any tricks to debugging python programs that are run under > dbus. > > I can see the sugar-datastore PID growing steadily while I test, whi

Re: [Sugar-devel] Debugging sugar-datastore (and similar dbus-connected services)

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 4:54 PM, Gonzalo Odiard wrote: > You already have the line > export SUGAR_LOGGER_LEVEL=debug > uncommented in .sugar/debug, right? Yes. And with that, datastore.log is very chatty, which is good. But when the datastore code hits an unhandled exception, the exception does

Re: [Sugar-devel] [PATCH Browse] Error page SL #3500

2012-09-19 Thread Martin Langhoff
On Wed, Sep 19, 2012 at 6:54 AM, Manuel Kaufmann wrote: > On Tue, Sep 18, 2012 at 10:58 PM, James Cameron wrote: >> Neat. What method did you use to convert the image? > > Python... It is my best friend :) > import base64 base64.b64encode(open('browse-logo.png', 'r').read()) You have

[Sugar-devel] [PATCH 1/2] Add ds_clean flag to trigger index rebuilds #2095, #2317

2012-09-20 Thread Martin Langhoff
This gives us more complete coverage of cases where ENOSPC or other errors are hit when creating/updating datastore entries. Without this patch, using the Journal on ENOSPC sometimes leads to an "empty" Journal after restart. Datastore entries exist on disk but are not in the index (Xapian DB). W

[Sugar-devel] [PATCH 2/2] Remove invalid/corrupt on-disk entries #2317

2012-09-20 Thread Martin Langhoff
When operating close to ENOSPC, we sometimes end up with incomplete or invalid on-disk entries. So we prune these during index rebuild. --- src/carquinyol/datastore.py |7 +++ 1 file changed, 7 insertions(+) diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py index 6ede

[Sugar-devel] Datastore vs ENOSPC patches, progress

2012-09-20 Thread Martin Langhoff
Things I am working on - Add ds_clean flag to trigger index rebuilds - patch posted for review - Remove invalid corrupt disk entries - patch posted for review - When hitting ENOSPC, use a tmpfs for index database -- working on it... m -- martin.langh...@gmail.com mar...@laptop.org -- So

[Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

2012-09-20 Thread Martin Langhoff
ses where we do rebuild it - the index recovers gracefully on restart when there is free disk space Martin Langhoff (7): Add ds_clean flag to trigger index rebuilds #2095, #2317 Remove invalid/corrupt on-disk entries #2317 metadatastore: store/change files on disk defensively #2317 metadat

[Sugar-devel] [PATCH 1/7] Add ds_clean flag to trigger index rebuilds #2095, #2317

2012-09-20 Thread Martin Langhoff
(Xapian DB). With this patch, failure to complete create/update/delete forces an index rebuild on restart. Signed-off-by: Martin Langhoff --- src/carquinyol/datastore.py | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/carquinyol/datastor

[Sugar-devel] [PATCH 2/7] Remove invalid/corrupt on-disk entries #2317

2012-09-20 Thread Martin Langhoff
When operating close to ENOSPC, we sometimes end up with incomplete or invalid on-disk entries. So we prune these during index rebuild. Signed-off-by: Martin Langhoff --- src/carquinyol/datastore.py |8 1 file changed, 8 insertions(+) diff --git a/src/carquinyol/datastore.py b/src

[Sugar-devel] [PATCH 4/7] metadatareader: ignore ".hidden" files

2012-09-20 Thread Martin Langhoff
Ignore any file with a filename starting with a '.' -- metadatastore writes its tempfiles prefixed with a '.' . Signed-off-by: Martin Langhoff --- Note: this one needs a bit of testing. --- src/carquinyol/metadatareader.c |7 ++- 1 file changed, 2 insertions(+),

[Sugar-devel] [PATCH 3/7] metadatastore: store/change files on disk defensively #2317

2012-09-20 Thread Martin Langhoff
the system hitting ENOSPC. Signed-off-by: Martin Langhoff --- src/carquinyol/metadatastore.py | 51 ++- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/src/carquinyol/metadatastore.py b/src/carquinyol/metadatastore.py index 5967017..52cc10f

[Sugar-devel] [PATCH 5/7] indexstore: exit on _flush() errors, work on tmpdir

2012-09-20 Thread Martin Langhoff
is is normally caused by running into ENOSPC during a session, and is unrecoverable. dbus will respawn the process, the new spawn has a chance at cleanup, moving things to tmpfs. Signed-off-by: Martin Langhoff --- src/carquinyol/indexstore.py | 52

[Sugar-devel] [PATCH 6/7] datastore: make delete() more reliable, log properly

2012-09-20 Thread Martin Langhoff
- use try/except to catch and log errors in datastore.log (instead of echoing them to callers over dbus) - use rmtree() to more reliably remove the entry - get_entry_path() before we delete all the related metadata. Signed-off-by: Martin Langhoff --- src/carquinyol/datastore.py

[Sugar-devel] [PATCH 7/7] datastore: handle low-disk and ENOSPC conditions gracefully

2012-09-20 Thread Martin Langhoff
edora and OLPC builds, this is a tmpfs). It is only moved to disk if we are not in low-disk-space-available conditions. Signed-off-by: Martin Langhoff --- src/carquinyol/datastore.py | 87 +++ 1 file changed, 71 insertions(+), 16 deletions(-) diff --

[Sugar-devel] [PATCH 5/7] indexstore: exit on _flush() errors, work on tmpdir

2012-09-21 Thread Martin Langhoff
is is normally caused by running into ENOSPC during a session, and is unrecoverable. dbus will respawn the process, the new spawn has a chance at cleanup, moving things to tmpfs. Signed-off-by: Martin Langhoff --- This is v2 of the patch, making sure that later sessions rebuild the on-disk

Re: [Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

2012-09-21 Thread Martin Langhoff
On Thu, Sep 20, 2012 at 11:55 PM, Martin Langhoff wrote: > In conditions of very low disk space available, or ENOSPC, the datastore > misbehaves grossly: Reviews are boring. Testing is more fun! rpms for ARM at http://dev.laptop.org/~martin/ds-enospc/ How to test: - Set Sugar to v

Re: [Sugar-devel] [PATCH 3/7] metadatastore: store/change files on disk defensively #2317

2012-09-21 Thread Martin Langhoff
On Thu, Sep 20, 2012 at 11:55 PM, Martin Langhoff wrote: > -f = open(os.path.join(metadata_path, key), 'w') > -try: > -if isinstance(value, unicode): > -value = value.encode('utf-8') > -

[Sugar-devel] [PATCH 7/7] datastore: handle low-disk and ENOSPC conditions gracefully

2012-09-21 Thread Martin Langhoff
edora and OLPC builds, this is a tmpfs). It is only moved to disk if we are not in low-disk-space-available conditions. Signed-off-by: Martin Langhoff --- This is v2 of the patch, making sure the move to internal disk works in more cases, and that failure is recorded. Thanks Sam for the report!

Re: [Sugar-devel] [PATCH Browse] Error page SL #3500

2012-09-21 Thread Martin Langhoff
On Fri, Sep 21, 2012 at 6:56 PM, Manuel Kaufmann wrote: > I'm not sure to understand what you are saying here. I'm not doing > this each time the function is called. Here, I just showed what I did > to get the base64 file encoded. I mean, I did this just once and I put > the result inside the HTML

Re: [Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

2012-09-22 Thread Martin Langhoff
On Fri, Sep 21, 2012 at 11:36 AM, Martin Langhoff wrote: > Reviews are boring. Testing is more fun! rpms for ARM at > >http://dev.laptop.org/~martin/ds-enospc/ New rpms for testing, including "datastore: handle low-disk and ENOSPC conditions gracefully - v2". This is

Re: [Sugar-devel] [PATCH Browse] Error page SL #3500

2012-09-25 Thread Martin Langhoff
On Tue, Sep 25, 2012 at 12:43 PM, Manuel Kaufmann wrote: > ** Message: console message: @0: Not allowed to load local resource: > file:///home/humitos/src/browse/browse.png > > What do you think? Should I go for the file:// approach anyway? Hmmm, security, tiny performance tweak, what should I c

Re: [Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

2012-09-26 Thread Martin Langhoff
On Sat, Sep 22, 2012 at 10:09 PM, Martin Langhoff wrote: > On Fri, Sep 21, 2012 at 11:36 AM, Martin Langhoff > wrote: >> Reviews are boring. Testing is more fun! rpms for ARM at Reviews are boring, but necessary. As these patches have seen some reviews, and the ml is a bit awkward

[Sugar-devel] [PATCH] RFC: Optimizer: simplify, avoid hashing files, remove 'checksums' dir

2012-09-26 Thread Martin Langhoff
This patch changes the strategy used by optimize. Instead of maintaining a 'checksum' field for every file, and maintaining metadata about whether they are linked in the 'checksums' dir, it will only ever hash files that match size _exactly_ with a new file. A DS that does not see 2 files of ident

[Sugar-devel] using logging vs logger

2012-09-26 Thread Martin Langhoff
Sugar{,-toolkit,toolkit3,datastore} sources have a mix of direct calls to the logging module, and calls to it via the sugar logger instance of the logging module, which is configured. Early in sugar-session, I understand the use of logging before sugar.logger is setup. But after that... is there a

Re: [Sugar-devel] [PATCH Browse] Display only the URL in the URL entry SL #3553

2012-09-27 Thread Martin Langhoff
Is this really an improvement in behaviour? - The tabs are often too small to show the title. - The title is more important for the user than the URL. No? cheers, m On Mon, Sep 24, 2012 at 5:09 PM, Manuel Kaufmann wrote: > The Title of the current page is no longer shown in the URL > entry.

Re: [Sugar-devel] [PATCH Browse] Display only the URL in the URL entry SL #3553

2012-09-27 Thread Martin Langhoff
#x27;t find the discussion now. > CC both > > Gonzalo > > On Thu, Sep 27, 2012 at 11:25 AM, Martin Langhoff > wrote: >> >> Is this really an improvement in behaviour? >> >> - The tabs are often too small to show the title. >> - The title is more impo

Re: [Sugar-devel] Performace in os3

2012-09-27 Thread Martin Langhoff
On Thu, Sep 27, 2012 at 10:40 AM, Manuel Kaufmann wrote: > I'm working on my 1.75 XO with os3 and I feel it really slow. There > are some examples: At least part of this will be due to a much slower video driver we are using temporarily. But yeah, it hurts and we need to have that fixed. m --

Re: [Sugar-devel] [PATCH Browse] Display only the URL in the URL entry SL #3553

2012-09-27 Thread Martin Langhoff
On Thu, Sep 27, 2012 at 11:46 AM, Gary Martin wrote: > + exposing URLs for touch users. The cursor hover is the only way to expose > URLs when browsing (unless tap to editing them) Tap-to-switch-to-URL-and-edit, starting with "full URL is selected" is fine IMHO. You are missing a key "-", which

Re: [Sugar-devel] last-minute feature proposal for 0.98

2012-09-28 Thread Martin Langhoff
On Fri, Sep 28, 2012 at 12:26 PM, Manuel Quiñones wrote: > 2012/9/28 Walter Bender : >> I am hoping to get this into the OLPC 13.1 build. Any change of >> getting it into Sugar 0.98? > > Looks like a good addition for me and patch looks fine. Hmmm, lunch time! Ah, ooops! I would add the field to

Re: [Sugar-devel] [PATCH 4/7] metadatareader: ignore ".hidden" files

2012-10-01 Thread Martin Langhoff
On Mon, Oct 1, 2012 at 7:06 AM, Manuel Kaufmann wrote: > Just a comment: this patch removes the possibility to have a property > named "..property", right? is this OK? I hope it is. I don't know, I'm not an experienced Sugar hacker :-) What I can tell you is that I have never seen a property, in

Re: [Sugar-devel] [PATCH 1/7] Add ds_clean flag to trigger index rebuilds #2095, #2317

2012-10-01 Thread Martin Langhoff
On Sun, Sep 30, 2012 at 12:24 PM, Manuel Kaufmann wrote: > On Fri, Sep 21, 2012 at 12:55 AM, Martin Langhoff wrote: >> This gives us more complete coverage of cases where ENOSPC or >> other errors are hit when creating/updating datastore entries. > > I reviewed this patch a

Re: [Sugar-devel] [PATCH 3/7] metadatastore: store/change files on disk defensively #2317

2012-10-01 Thread Martin Langhoff
tadata files atomically, to avoid corrupting existing data in case of an error With this patch, we no longer corrupt metadata when trying to edit/update a ds entry with the system hitting ENOSPC. Signed-off-by: Martin Langhoff -- now, if you read carefully, it is the same thing I say in th

Re: [Sugar-devel] [PATCH 3/7] metadatastore: store/change files on disk defensively #2317

2012-10-01 Thread Martin Langhoff
On Mon, Oct 1, 2012 at 12:46 PM, Manuel Kaufmann wrote: > Sorry for the Top-Posting, maybe you didn't see the section that I > included in my last email. Ah, yeah, didn't catch that. > From that section I understand that we are encoding the data into > utf-8 if value is "unicode", but if it is j

Re: [Sugar-devel] [PATCH 3/7] metadatastore: store/change files on disk defensively #2317

2012-10-01 Thread Martin Langhoff
On Mon, Oct 1, 2012 at 12:59 PM, Martin Langhoff wrote: >> From that section I understand that we are encoding the data into >> utf-8 if value is "unicode", but if it is just a "basestring", why we >> are doing "str()"? > > That's ac

Re: [Sugar-devel] [PATCH Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-02 Thread Martin Langhoff
On Mon, Oct 1, 2012 at 3:14 PM, Manuel Kaufmann wrote: > This patch is a workaround to that behaviour. Every time that Browse > is started it looks for all the ".goutputstream" files in the > "instance" directory and checks its mtime. If it greater than 1 day it > removes the old temporary file.

Re: [Sugar-devel] [PATCH Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-02 Thread Martin Langhoff
On Tue, Oct 2, 2012 at 8:24 AM, Manuel Kaufmann wrote: > On Tue, Oct 2, 2012 at 6:40 AM, Martin Langhoff > wrote: >> Good, but not enough. Compare mtime also to our boot time (ie: now - >> uptime). If the file is from before we booted, needs to be nuked. > > You say tha

Re: [Sugar-devel] [PATCH v2 Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-02 Thread Martin Langhoff
On Tue, Oct 2, 2012 at 9:59 AM, Manuel Kaufmann wrote: > +try: > +uptime_proc = open('/proc/uptime', 'r').read() > +uptime_seconds = float(uptime_proc.split()[0]) > +uptime = datetime.timedelta(seconds=uptime_seconds) > +except: > +lo

Re: [Sugar-devel] [PATCH v2 Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-02 Thread Martin Langhoff
On Tue, Oct 2, 2012 at 2:52 PM, Manuel Kaufmann wrote: > On Tue, Oct 2, 2012 at 1:43 PM, Martin Langhoff > wrote: >>> +except: >>> +logging.warning('/proc/uptime could not be read') >>> +uptime = None > > Should

Re: [Sugar-devel] [PATCH v2 Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-02 Thread Martin Langhoff
On Tue, Oct 2, 2012 at 3:51 PM, Martin Langhoff wrote: > Works as pseudocode. But I took a quick look at the datetime docs and > it is... horrible. We want to be doing math on the epoch (seconds > since 1970). > > They refuse to document it properly, but the answer t

Re: [Sugar-devel] [PATCH v2 Browse] Remove temporary downloaded (cancelled) files SL #3973

2012-10-03 Thread Martin Langhoff
On Wed, Oct 3, 2012 at 6:52 AM, Manuel Kaufmann wrote: > On Tue, Oct 2, 2012 at 5:35 PM, Martin Langhoff > wrote: >> Actually, the answer is to avoid datetime. It's fine for high level >> work; when you care about times defined as epoch values, you > > Yes, you ar

Re: [Sugar-devel] GStreamer 1.0.0 has been released

2012-10-03 Thread Martin Langhoff
On Wed, Oct 3, 2012 at 11:54 AM, Peter Robinson wrote: > You can still port to gstreamer 1.0 on 13.1.0 and just test with non > ugly codecs (vorbis / webm etc). Yep. Work now with the ugly codecs. Once vmeta is ready we'll have to retest & debug, as it seems to be more fragile. Extra work :-(

Re: [Sugar-devel] [PATCH artwork] Style active state of activities in home view for tap and click feedback

2012-10-03 Thread Martin Langhoff
On Wed, Oct 3, 2012 at 4:53 PM, Manuel Quiñones wrote: > Add a light grey background, which is the same size as the grey > outline that appears when the icon is hovered. Yes! This stuff is needed. Touch feedback needs to be bright, clear, and clearly larger than your finger so that you see it.

Re: [Sugar-devel] [PATCH artwork] Style active state of activities in home view for tap and click feedback

2012-10-03 Thread Martin Langhoff
On Wed, Oct 3, 2012 at 5:12 PM, Manuel Quiñones wrote: > And enlarging a bit: > > http://dev.laptop.org/~manuq/shell-port/icon-hover2.png > http://dev.laptop.org/~manuq/shell-port/icon-tap2.png I am partial towards the enlarged ones :-) cheers, m -- martin.langh...@gmail.com mar...@laptop.

Re: [Sugar-devel] [PATCH] Sort the activities in the home in alphabetic order

2012-10-04 Thread Martin Langhoff
On Thu, Oct 4, 2012 at 8:06 AM, wrote: > The change is done in the favorites view and in the list view What was the sorting before in the fav view? More importantly -- Is this sorting over the English names, or the localized names? I am not sure what we would desire, but I'll note that if it's

Re: [Sugar-devel] [PATCH] Sort the activities in the home in alphabetic order

2012-10-04 Thread Martin Langhoff
On Thu, Oct 4, 2012 at 10:33 AM, Gonzalo Odiard wrote: > We are sorting by localized name. > It's true than the order will be different if you use a different language, > but we think is better for the users. Less consistency in icon location better? How? I agree alphabetical is better for list

Re: [Sugar-devel] [PATCH] Sort the activities in the home in alphabetic order

2012-10-04 Thread Martin Langhoff
On Thu, Oct 4, 2012 at 11:25 AM, Gonzalo Odiard wrote: > You have less consistency only if you change the language. I generally agree. My only worry is that documentation screenshots will be all over the place. > Have sense use the same order in the listview and in the favorites view too. yeah.

Re: [Sugar-devel] [PATCH] Sort the activities in the home in alphabetic order

2012-10-04 Thread Martin Langhoff
On Thu, Oct 4, 2012 at 3:15 PM, Gary Martin wrote: > Martin, could you clarify this example a little more, > did you have some specific documentation task in mind? I want to clarify that I see this patch as a big improvement, even with localized sorting. +100. We often prepare some screenshots f

Re: [Sugar-devel] Multi-touch test activity

2012-11-06 Thread Martin Langhoff
On Sun, Nov 4, 2012 at 8:29 PM, Bert Freudenberg wrote: > Ah, thanks. I wasn't even going to file a bug report about the aliasing > because that is a limitation inherent to the kind of sensor we have. There are of course limitations, but we are in the process of tuning and tightening things on t

Re: [Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

2012-11-07 Thread Martin Langhoff
On Wed, Nov 7, 2012 at 2:31 AM, Simon Schampijer wrote: > Thanks Martin, Sam and Manuel for your work on this. The datastore runs here > fine. I pushed the changes. Will be available in 0.97.2. Great! I was going to write a longer thank-you for the review, but I ran out of space. :-) m -- ma

Re: [Sugar-devel] Datastore is broken

2012-11-07 Thread Martin Langhoff
On Wed, Nov 7, 2012 at 11:51 AM, Simon Schampijer wrote: > On 11/07/2012 02:45 PM, Daniel Narvaez wrote: >> Buildbot tests are failing, apparently because of a datastore issue I owe you two a beer. A mighty big beer. Thanks for spotting this thinko before it landed in an OS build. > We fail bec

Re: [Sugar-devel] Datastore is broken

2012-11-07 Thread Martin Langhoff
Hmmm, mkdir??? I'd suggest touch /home/user/.sugar/default/datastore/index m On Wed, Nov 7, 2012 at 2:35 PM, Ignacio Rodríguez wrote: > ¡For repair!: > mkdir /home/user/.sugar/default/datastore/index > :) > > > 2012/11/7 Martin Langhoff >> >> On

Re: [Sugar-devel] Datastore is broken

2012-11-08 Thread Martin Langhoff
Thanks for the heads up! Fix attached, m On Thu, Nov 8, 2012 at 1:11 PM, Daniel Narvaez wrote: > Not sure if it breaks anything but it doesn't sound good, with the latest git: > > Traceback (most recent call last): > File > "/home/buildbot/slave/fedora-17-32bit/build/install/lib/python2.7/s

Re: [Sugar-devel] [FEATURE-BROKEN] "Send to Friend" feature not working in os11

2012-11-16 Thread Martin Langhoff
How about filing a bug? :-) m On Fri, Nov 16, 2012 at 12:26 PM, Ajay Garg wrote: > Hi all. > > On XO-1.75s, os11 image, the "Send to Friend" feature isn't working. > > Is it a known issue? > Doing a simple textual "send to" search on bugs.sugarlabs.org did not yield > anything useful. > > > Reg

Re: [Sugar-devel] [sugar-build] Recent improvements

2012-11-18 Thread Martin Langhoff
On Fri, Nov 16, 2012 at 12:10 PM, Daniel Narvaez wrote: > * Much cleaner source code. I got rid of jhbuild and replaced it with > a simple python script which covers our need (and it's much easier to > customize). Whooo! After _years_ of discussion about getting rid of jhbuild, it's done! I

<    1   2   3   4   5   6   7   8   >