Re: [Sugar-devel] ticket #2195

2010-09-13 Thread James Cameron
On Fri, Sep 10, 2010 at 11:28:12PM +0530, Ishan Bansal wrote:
 I am working on the bug http://bugs.sugarlabs.org/ticket/2195.

You might ask Anurag, as Anurag is assigned to the bug.

 To correct the issue i did changes in file
 sugar-jhbuild/sources/sugar/extension/cpsection/datetime/model.py but
 even after re-building sugar-jhbuild there was no noticeable change in
 the time shown. I have used pippy activity to check for time.

Exactly what change did you make?

 Can you provide me any pointers on the above mentioned bug?

I've reproduced the bug and written up my findings.  The timezone
specifier accepted by libc is reversed, easily reproduced also at a
shell prompt.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] VncLauncher can't find the needed libs on OLPC's 10.1.2 release

2010-09-13 Thread James Cameron
On Fri, Sep 10, 2010 at 04:31:30AM -0400, Raul Gutierrez Segales wrote:
 Here is a working (temporary) release:
 
 http://people.sugarlabs.org/~rgs/activities/vnclauncher-7.xo
 
 Note: I think this problem only affects 10.1.2. Dextrose users shouldn't
 be affected because the libvncserver package is included on those
 builds. 

Should we add libvncserver to the 10.1.3 build?  It seems to install
fine using yum.  The libvncserver.so.0 after install has the same md5sum
as the one in vnclauncher-7.xo.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] VncLauncher can't find the needed libs on OLPC's 10.1.2 release

2010-09-13 Thread Raul Gutierrez Segales
On Mon, 2010-09-13 at 17:25 +1000, James Cameron wrote:
 On Fri, Sep 10, 2010 at 04:31:30AM -0400, Raul Gutierrez Segales wrote:
  Here is a working (temporary) release:
  
  http://people.sugarlabs.org/~rgs/activities/vnclauncher-7.xo
  
  Note: I think this problem only affects 10.1.2. Dextrose users shouldn't
  be affected because the libvncserver package is included on those
  builds. 
 
 Should we add libvncserver to the 10.1.3 build?  It seems to install
 fine using yum.  The libvncserver.so.0 after install has the same md5sum
 as the one in vnclauncher-7.xo.
 

That is one way out of the problem. I think the long standing
meta-question is how do Activity developers handle external libs.

If we go and add libvncserver than you we'll set a precedent. The next
time someone comes in with a new dependency requirement, will we be
spinning a new build?



___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] wanting to try recent Sugar, problems

2010-09-13 Thread Sascha Silbe
Excerpts from Anish Mangal's message of Wed Sep 01 13:32:55 +0200 2010:

  don't install Sugar distro packages and sugar-jhbuild in parallel on
  the same VM, it'll cause trouble).
 
 Can you elaborate what would be the nature of these problems?

For distro packages vs. sugar-jhbuild issues in general, see SL#111 [1]
and SL#2304 [2]. I don't remember any written record of Glucose distro
packages (as opposed to GConf-dbus) breaking anything, but seem to
remember I've hit it during testing once. This kind of issue is usually
rather hard to detect and diagnose, so it's better to simply not try it.
If you still try it and find out that sugar-jhbuild needs to do something
(usually setting an environment variable) to make something in
sugar-jhbuild preferred to the same thing in the distro, please file a
bug on bugs.sl.o [3].


 I've been trying to get a clean jhbuild env to work under f13.
 gabble/salut don't work when I run the sugar-emulator. and I can't
 share activities.
 
 To test whether is this was a system-wide problem, I installed the
 sugar-* rpm's as well. The package-installed sugar-emulator starts up
 well; gabble/salut don't crash and I can get activities to be shared.

Your particular problem stems from the fact that the latest development
version (i.e. git HEAD) has had Tomeus Remove Presence Service [4]
Feature landed which requires the very latest (not yet packaged) releases
of several Telepathy components. The Fedora 13 Sugar packages OTOH contain
old code that works fine with older versions of Telepathy.

Sascha

[1] https://bugs.sugarlabs.org/ticket/111
[2] https://bugs.sugarlabs.org/ticket/2304
[3] https://bugs.sugarlabs.org/newticket?component=sugar-jhbuild
[4] https://wiki.sugarlabs.org/go/Features/Remove_Presence_Service
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Sugar-news] Sugar Digest 2010-09-12

2010-09-13 Thread Aleksey Lim
On Sun, Sep 12, 2010 at 02:52:08PM -0400, Walter Bender wrote:
 ===Tech Talk ===
 
 5. Aleksey Lim has set up an IRC channel for newbie developers:
 #sugar-newbies on freenode. The channel is logged so that we can
 archive newbie questions and answers
 ([http://jita.sugarlabs.org/freenode/%23sugar-newbies/index.html]).

After switching to the new webui, it is
http://jita.sugarlabs.org/sugar-newbies
(but will be
http://meetings.sugarlabs.org/sugar-newbies after updating DNS records)

-- 
Aleksey
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-0.84] journal scan of external media

2010-09-13 Thread James Cameron
On Fri, Sep 10, 2010 at 05:22:58PM +0200, Sascha Silbe wrote:
 Excerpts from James Cameron's message of Thu Sep 09 03:24:36 +0200 2010:
+if None not in [self._date_start, self._date_end] and \
+(stat.st_mtime  self._date_start or
+ stat.st_mtime  self._date_end):
+add_to_list = False
   
   How about either checking just self._date_start or splitting it up into
   two separate rules?
  
  Don't understand, sorry.
 
 I mean either:
 
 if self._date_start is not None and self.st_mtime  self._date_start:
 return True
 if self._date_end is not None and self.st_mtime  self._date_end:
 return True

Thanks, taken.

 [ENOTDIR during os.listdir()]
  The reproducible instance is /media/disk/dev/fd/24 ... since fd is a
  symlink to /proc/self/fd ... (awesome isn't it?  One can insert a USB key
  that will list the contents of any directory on the laptop, provided
  access is allowed.)
 
 Ah, it's good that came up during testing, didn't think about it. We
 should make sure symlinks don't point outside the filesystem by resolving
 them (os.path.abspath()) and checking against the root path.

Agreed.  ENOTDIR removed and os.path.abspath added.

  os.lstat of an entry returned by os.listdir
 [...]
  exception EIO a total of 7 times
 
 Interesting. Was the storage medium broken in some way (read error)?
 I don't even see EIO as a documented error code for lstat(2).

Yes, storage medium is broken.  It is a USB HDD with reallocated sectors
and no spare area sectors available, or with a pending unstable sector
waiting to be remapped.  dmesg shows:

[ 5070.582713] sd 7:0:0:0: [sda] Unhandled sense code
[ 5070.582726] sd 7:0:0:0: [sda] Result: hostbyte=DID_ERROR 
driverbyte=DRIVER_SENSE
[ 5070.582740] sd 7:0:0:0: [sda] Sense Key : Hardware Error [current] 
[ 5070.582757] sd 7:0:0:0: [sda] Add. Sense: No additional sense information
[ 5070.582774] end_request: I/O error, dev sda, sector 66846816
[ 5070.584114] EXT2-fs error (device sda1): ext2_get_inode: unable to read 
inode block - inode=2084987, block=8355848

The drive itself is reasonably old and should have completely failed
long ago.

   Why? The order in which os.listdir() returns the entries is undefined
   anyway.
  
  When one uses os.listdir and then reverses the order before going
  through them, the resulting performance is low, since the files are
  being accessed in reverse.  Because I didn't know about pop(0), I had to
  use .reverse() to maintain ordering.
 
 Ah, don't you love how undefined behaviour still affects performance?

I think that's quite expected, especially since performance is equally
undefined.  Although the order may not be defined, there is likely to be
an ordering imposed by the underlying implementation.

 [_scan()]
  +if len(self._pending_files)  0:
  +return self._scan_a_file()
  +
  +if len(self._pending_directories)  0:
  +return self._scan_a_directory()
 
 PEP-8 says we should use if self._pending_* instead (without len()).
 
 If we just call the functions and return True in _scan(), we don't
 need to ensure that we always return True in self._scan_a_*().

Thanks, taken both points.

On Fri, Sep 10, 2010 at 06:27:50PM +0200, Sascha Silbe wrote:
 Excerpts from James Cameron's message of Thu Sep 09 06:39:53 +0200 2010:
 
  +if link == '.':
  +return True
 
  +if link.startswith('/') and full_path.startswith(link):
  +return True
 
 Both shouldn't be necessary (will be catched by the loop detection).
 
 As mentioned in the other mail, we should also make sure we stay on the
 current device:
 
 if not os.path.abspath(full_path).startswith(self._mount_point):
 return True

Taken, with modification ... only need to check the absolute path of a
link after it is read, not before.

Repeated test on Sugar 0.84 with my set of working and broken devices.
The following diff is proposed for final review.

diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 50e8dc1..6b1011c 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, One Laptop Per Child
+# Copyright (C) 2007-2010, One Laptop per Child
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,10 +16,11 @@
 
 import logging
 import os
+import errno
 from datetime import datetime
 import time
 import shutil
-from stat import S_IFMT, S_IFDIR, S_IFREG
+from stat import S_IFLNK, S_IFMT, S_IFDIR, S_IFREG
 import traceback
 import re
 
@@ -258,7 +259,9 @@ class InplaceResultSet(BaseResultSet):
 BaseResultSet.__init__(self, query, cache_limit)
 self._mount_point = mount_point
 self._file_list = None
-self._pending_directories = 0
+self._pending_directories = []
+

Re: [Sugar-devel] Sugar-devel Digest, Vol 23, Issue 53

2010-09-13 Thread Manusheel Gupta
On Mon, Sep 13, 2010 at 2:49 PM, sugar-devel-requ...@lists.sugarlabs.orgwrote:

 -

  To correct the issue i did changes in file
  sugar-jhbuild/sources/sugar/extension/cpsection/datetime/model.py but
  even after re-building sugar-jhbuild there was no noticeable change in
  the time shown. I have used pippy activity to check for time.

 Exactly what change did you make?

  Can you provide me any pointers on the above mentioned bug?

 I've reproduced the bug and written up my findings.  The timezone
 specifier accepted by libc is reversed, easily reproduced also at a
 shell prompt.


James, thank you. Appreciate it.

Ishan, the pointers provided by James should make things easier for you to
work on, in reference to this bug.

Regards,

Manu



 --
 James Cameron
 http://quozl.linux.org.au/



 ***

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [FEATURE] Remove Presence Service --- cleanup for release

2010-09-13 Thread Simon Schampijer
On 08/30/2010 08:19 AM, Simon Schampijer wrote:
 Hi Tomeu,

 your Feature [1] has found it's way into the 0.90 release, thank you for
 getting this far! This is just great!

 The following items need to be done until the release at the end of the
 month (ordered by priority):

 * Instructions for testing (URGENT): As this Feature touches one of the
 key features of Sugar (Collaboration) we should make sure to not
 introduce any regressions. I know that testing sharing has many cases
 but we should at least get a list what areas need testing and can refine
 then from there.

 * Bug fixing: As you stated in your proposal you will be around for
 fixing bugs introduced by your code. This is great.

 * Testing: As we do not have a very wide community of testers (yet) I
 would like to ask you to help in the testing efforts.

 * Release Notes: If you could add a few lines in the Feature page how
 you would best describe your Feature to a possibly non technical
 audience would be great.

 In behalf of the sugar community,
   Your Release Team

 [1] http://wiki.sugarlabs.org/go/Features/Remove_Presence_Service

Ping, can we get the items listed above done?

Thanks,
Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [FEATURE] Enhanced color selector --- cleanup for release

2010-09-13 Thread Simon Schampijer
On 08/30/2010 08:29 AM, Simon Schampijer wrote:
 Hi Walter,

 your Feature [1] has found it's way into the 0.90 release, thank you for
 getting this far! This is just great!

 The following items need to be done until the release at the end of the
 month (ordered by priority):

 * Summary: The summary does not seem to be up to date anymore, please
 adjust it accordingly.

 * Instructions for testing: Can you refine the testing plan in your page
 to explain how the outer XOs are effected by the color change (maybe add
 a two or three screen shots)?

 * Bug fixing: Please watch out for bugs that have been introduced by
 your Feature.

 * Testing: As we do not have a very wide community of testers (yet) I
 would like to ask you to help in the testing efforts.

 * Release Notes: If you could add a few lines in the Feature page how
 you would best describe your Feature to a possibly non technical
 audience would be great.

 In behalf of the sugar community,
   Your Release Team

Thanks Walter, looks good now!

Regards,
Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [FEATURE] Spiral Home View --- cleanup for release

2010-09-13 Thread Simon Schampijer
Hi Walter,

On 08/30/2010 08:35 AM, Simon Schampijer wrote:
 Hi Walter,

 your Feature [1] has found it's way into the 0.90 release, thank you for
 getting this far! This is just great!

 The following items need to be done until the release at the end of the
 month (ordered by priority):

 * Please land #2235 as soon as possible.

This one is pending. Today is Hard code freeze. We either land it today 
or it has to wait until 0.92. Would be great if we could make it.

 * Instructions for testing: Clean up the testing plan.

Can we get a testing plan here?

Thank you for your efforts in advance,

Regards,
Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [FEATURE] Journal_Sort --- cleanup for release

2010-09-13 Thread Simon Schampijer
Hi Andrés,

On 08/30/2010 08:44 AM, Simon Schampijer wrote:
 Hi Andrés,

 your Feature [1] has found it's way into the 0.90 release, thank you for
 getting this far! This is just great!

 The following items need to be done until the release at the end of the
 month (ordered by priority):

 * Instructions for testing: Please add detailed instructions on how to
 test your Feature (e.g. update with an existing DS etc).

Can you add descriptions for testing?

 * Bug fixing: Please watch out for bugs that have been introduced by
 your Feature.
 
 * Testing: As we do not have a very wide community of testers (yet) I
 would like to ask you to help in the testing efforts.

Did you have a chance to do testing? Upgrade the DS from 0.84 to 0.90 
for example?

 * Adjust Summary: The summary should be directed more to the end user.
 No need to mention the new properties (this can be done in Scope).

Can you adjust the summary as well?

Thanks,
Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [FEATURE] Spiral Home View --- cleanup for release

2010-09-13 Thread Walter Bender
On Mon, Sep 13, 2010 at 9:10 AM, Simon Schampijer si...@schampijer.de wrote:
 Hi Walter,

 On 08/30/2010 08:35 AM, Simon Schampijer wrote:

 Hi Walter,

 your Feature [1] has found it's way into the 0.90 release, thank you for
 getting this far! This is just great!

 The following items need to be done until the release at the end of the
 month (ordered by priority):

 * Please land #2235 as soon as possible.

 This one is pending. Today is Hard code freeze. We either land it today or
 it has to wait until 0.92. Would be great if we could make it.

 * Instructions for testing: Clean up the testing plan.

 Can we get a testing plan here?

http://wiki.sugarlabs.org/go/Features/Spiral_Home_View#How_To_Test


 Thank you for your efforts in advance,

 Regards,
   Simon




-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Feedback about ticket #10122

2010-09-13 Thread Gonzalo Odiard
Hi Benjamin
Thanks for review.
I don't know if you have time now, but I can devote a few hours to Distance.
I understand your concern about the volume change.

Maybe the right answer is to print some warning text if the system volume
is too low. I think a better patch would probably show the user the
amplitude of the last received signal and the noise floor. This is easy to
measure, but I'm not sure how to display it in the GUI.

If you can tell me how detect the volume from the signal it's not enough to
make a measurement, i can try to work in the interface work.
Do you dislike the semaphore idea?
May be use icons?

What you think about saving in the journal?

Regards

Gonzalo

On Fri, Sep 10, 2010 at 2:02 PM, Gonzalo Odiard godi...@sugarlabs.orgwrote:

 On Fri, Sep 10, 2010 at 11:10 AM, Benjamin M. Schwartz 
 bmsch...@fas.harvard.edu wrote:

 On 09/10/2010 09:54 AM, Gonzalo Odiard wrote:
  Hi Ben:
  I am trying to resolve the ticket http://dev.laptop.org/ticket/10122
  Can you review it? Could you test it in XO-1.5?

 I've been following the discussion, but I haven't looked at the patch yet.
  I've had a rather busy week.

 I can't easily test changes because my XO-1.5 is broken, but maybe I can
 fix it this weekend.


 Ok. Tell me if I can send you more information.



   There are changes I did based in my tests, but I need to know if you
 agree.

 I'm concerned about any making Distance change the volume settings.  This
 might make sense for the microphone amplification setting, but I would
 prefer to leave the speaker volume under the user's control.  The
 appropriate volume to use for Distance depends on how long a distance one
 is trying to measure, the level of background noise, whether other people
 might be disturbed, etc.

 I was thinking we can show a semaphore or any image with the quality of
 the measure, in base of the difference with the previous measurements.
 For example if the difference with the last is until 5% different its green
 , until 30% yellow, more is red.
 Also we can put a text suggesting turn up the volume for better results.


 The changes in delay constant could make sense.  I'll need to look at the
 changes and see if we can find an explanation for the changes.

 Other problem I am having is (in Sugar 0.84) if I restart a previously
 shared activity, the activity starts shared, but not appears in the
 neighborhood view from the other machines.
 I need to start a new activity and then share.

 Also I don't know if it's a good idea Distance save in the Journal.  Only
 saves the temp and humid values and the last measurement.
 May be we can save these values in the activity_root/data directory from
 the activity, not pollute the Journal and resolve the resume issue. What you
 think? The change is easy.
 Regards

 Gonzalo




-- 
Gonzalo Odiard
SugarLabs Argentina
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar and activities flag day

2010-09-13 Thread Daniel Drake
On 10 September 2010 13:41, Daniel Drake d...@laptop.org wrote:
 Just wanted to summarize an enlightening conversation that just
 happened in #sugar:

No responses..surprising!
Let me try a bit harder then.

My thoughts/suggestions:

1. Rename sugar-0.92 to Sugar-1.0

2. Switch to pygi and GTK+ 3 for sugar-1.0

3. Allow significant sugar API changes up until the sugar-1.0 API
freeze date, which I think would land mid-January 2011. These would be
subject to the usual review processes to ensure quality.

4. Ignore the silly people who draw large conclusions from looking at
a version number

5. Publicise the fact that sugar-1.0 is an API break in all activities

6. If anyone had plans or specific goals for sugar-1.0 that won't be
ready in time, push them off to sugar-2.0 (which can be released on
the original timeline that people had thought for the original
sugar-1.0)

7. switch to python3 at the same time? (ok, this one wasn't discussed,
and I'm not sure of the realities, just something that crossed my
mind!)

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar and activities flag day

2010-09-13 Thread Marco Pesenti Gritti
On Mon, Sep 13, 2010 at 4:58 PM, Daniel Drake d...@laptop.org wrote:
 On 10 September 2010 13:41, Daniel Drake d...@laptop.org wrote:
 Just wanted to summarize an enlightening conversation that just
 happened in #sugar:

 No responses..surprising!
 Let me try a bit harder then.

 My thoughts/suggestions:

 1. Rename sugar-0.92 to Sugar-1.0

 2. Switch to pygi and GTK+ 3 for sugar-1.0

 3. Allow significant sugar API changes up until the sugar-1.0 API
 freeze date, which I think would land mid-January 2011. These would be
 subject to the usual review processes to ensure quality.

The time might be a bit short to do both porting and API changes. An
alternative would be to have a longer unstable cycle (probably in
parallel to a stable 0.92). I have the feeling that porting stable
changes to unstable for a long time might be too much work for us
though. So perhaps we really have to break API two times (1.0 and
2.0)...

Marco
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Question about upgrading from 802 to Dextrose

2010-09-13 Thread Christoph Derndorfer
Hi all,

as previously mentioned to Bernie I'm thinking about using the international
spin of Dextrose on the 25 XO-1s that we're using in our Austrian pilot
project.

IIRC correctly those XO-1s are currently running 802 and now I was wondering
whether there was a way to upgrade them to Dextrose without erasing the
Journal (e.g. something like olpc-update but using Dextrose rather OLPC's
10.1.2).

Thanks,
Christoph

-- 
Christoph Derndorfer
co-editor, olpcnews
url: www.olpcnews.com
e-mail: christ...@olpcnews.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Question about upgrading from 802 to Dextrose

2010-09-13 Thread Martin Abente
We have not tried that yet, but dextrose provides a backup/restore to usb
stick option that you might find useful.

On Mon, 13 Sep 2010 18:45:22 +0200, Christoph Derndorfer
christoph.derndor...@gmail.com wrote:
 Hi all,
 
 as previously mentioned to Bernie I'm thinking about using the
 international
 spin of Dextrose on the 25 XO-1s that we're using in our Austrian pilot
 project.
 
 IIRC correctly those XO-1s are currently running 802 and now I was
 wondering
 whether there was a way to upgrade them to Dextrose without erasing the
 Journal (e.g. something like olpc-update but using Dextrose rather
OLPC's
 10.1.2).
 
 Thanks,
 Christoph
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-0.84] journal scan of external media

2010-09-13 Thread Sascha Silbe
Excerpts from James Cameron's message of Mon Sep 13 11:19:07 +0200 2010:

  Ah, don't you love how undefined behaviour still affects performance?
 
 I think that's quite expected, especially since performance is equally
 undefined.  Although the order may not be defined, there is likely to be
 an ordering imposed by the underlying implementation.

OK, good point.

 Repeated test on Sugar 0.84 with my set of working and broken devices.
 The following diff is proposed for final review.

After staring at it for about half an hour, I couldn't find anything to
reasonably nag about.

Reviewed-By: Sascha Silbe sascha-...@silbe.org

If you'd like, you could replace your pending lists with
collections.deque which is supposed to be suited better to your use
case, especially for the .pop(0).
I'd expect the scanning to be IO-bound in most cases, so keeping the
lists should be acceptable (if you don't want to retest with the deque).

Thanks!

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Turtle Blocks-97

2010-09-13 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4027

Sugar Platform:
0.82 - 0.90

Download Now:
http://activities.sugarlabs.org/downloads/file/27033/turtle_art-97.xo

Release notes:
* recenter default turtle when dragged onto palette
* removed comment label from collapsible stacks
* made font smaller on the bottom-of-collapsible-stack block (#2305)
* rgs fixed resume problem in GNOME version (#2293)
* checking alpha value to block 'hit' detection (fixes problem with
  selecting the wrong block when blocks wrap around each other).
* trap and display math errors in python block (#2313)


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] sugar cursors offset?

2010-09-13 Thread Erik Blankinship
Maybe I am reading these files wrong (more likely I don't understand how
they are converted) but I think the top row of sugar cursors is off by one
column of pixels?
http://git.sugarlabs.org/projects/sugar-artwork/repos/mainline/trees/master/cursor/sugar
(This is most easy to catch when comparing the top_right cursor to the one
beneath it.)

Related, don't you think we should get all of these cursors for Sugar?
http://www.pygtk.org/docs/pygtk/class-gdkcursor.html
Gumby is, after all, a cartoon for children.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] soas-i386-20100912.17.iso How to make a Bootable sugar USB from this Nightly Compose .iso

2010-09-13 Thread Thomas C Gilliard

Created from .iso to 8 GB Lexar USB.
liveusb-creator --reset-mbr (f12)linux, 8 GB Lexar USB 
soas-i386-20100912.17.iso persistence:1290  fat32 USB

*
*Boots to grey screen with X
Method to fix:* * add selinux=0 3 to boot line, login root: Fix known 
bug 627401: [35] https://bugzilla.redhat.com/show_bug.cgi?id=627401 
*rm /etc/systemd/system/default.target then ln -s 
/lib/systemd/system/graphical.target 
/etc/systemd/system/default.target*, yum groupinstall XFCE (40 pkgs); 
shutdown -h now reboot with boot line added 5 to end. comes up asking 
for colors_ in sugar.
** Presence service works, sees jabber if leave it on AdHoc Network 1 
(already connected).


Details:
Sugar on a stick Mango Lassi
Fedora 14 (Laughlin)
sugar: 0.89.3

Link to tests showing method:


http://wiki.sugarlabs.org/go/Talk:Sugar_on_a_Stick_release_process#Bootable_USB


Something in XFCE fixes Soas and allows sucessful boot. Never goes to 
firstboot or gdm, goes straight to sugar.


Tom Gilliard
satellit
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Sliderule-16

2010-09-13 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4222

Sugar Platform:
0.82 - 0.90

Download Now:
http://activities.sugarlabs.org/downloads/file/27034/sliderule-16.xo

Release notes:
* customizable slide (make your own slide rule)
* enable typing into tabs to move slides
* major refactoring of calculations
* major refactoring of slide, stator generation



Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] VncLauncher can't find the needed libs on OLPC's 10.1.2 release

2010-09-13 Thread Daniel Drake
On 13 September 2010 01:25, James Cameron qu...@laptop.org wrote:
 Should we add libvncserver to the 10.1.3 build?  It seems to install
 fine using yum.  The libvncserver.so.0 after install has the same md5sum
 as the one in vnclauncher-7.xo.

For meeting activitity dependencies I think we should limit ourselves
to things that we have shipped in the past, and things listed on the
sugar platform page.

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [RELEASE] Etoys 4.1.2386

2010-09-13 Thread Bert Freudenberg
== Sources ==

http://download.sugarlabs.org/sources/sucrose/glucose/etoys/etoys-4.1.2386.tar.gz

== Changes since 4.1.2384 (beta) ==
* do not hard-code squeak vm path
* replace == with = in shell tests
* fix paintbox in event theatre
* fix SuppliesPlayersTool guide
* remove MenuMakeNewFlap guide from index
* pop-up arrows now enabled by default
* new DrGeo examples project (see gallery)
* new home project (green border more visible)
* Demon Castle renamed to Etoys Castle and fixed
* revised guides for English and Spanish
* DrGeoII translations for de,es,fr,ja
* updated German and Japanese translations
* do not ship languages with too few translations (ar_SY, en_GB, km, pap, pl, 
zh_TW)
* hide distracting/not-functional preference panel buttons
* allow negative timer values
* shared flaps are not destroyed anymore when switching projects
* various smaller fixes

== Changes since 4.1.2382 (alpha 2) ==

* no save on stop under Sugar, must use keep button (enable sugarAutoSave to 
revert to old behavior)
* easier to make flap (see supplies)
* GSoC addition: scriptable speech bubbles
* translatability of Text object must be enabled explicitly
* minor fixes
* updated translations from Pootle
* added languages zh_CN, ca, sk, pap, pl, km, en_GB, ar_SY
* revised Italian, Portuguese, and German QuickGuides

== Changes since 4.1.2381 (alpha 1) ==

* fix DBus service methods
* fix NavBar not showing Sugar buttons
* fix 'length' and 'width' being read-only
* flip commands renamed to 'flip left right' and 'flip up down'
* fix QuickGuides showing up twice

== Changes since 4.0 (previous stable) ==

* switched to etoys.squeak.org/svn repo
* translations broken up in smaller files
* activity version will not track etoys version anymore
* QuickGuides translated to Spanish, Portuguese, German, Italian, and (some) 
French
* added DrGeo for exploring geometry
* sketches support flipping
* geometry tiles for the world
* timer tile (world and other playfields)
* can store preferences
* plus bug fixes

- Bert - (for the Etoys team)

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Question about upgrading from 802 to Dextrose

2010-09-13 Thread Bernie Innocenti
Spam detection software, running on the system sunjammer.sugarlabs.org, has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  On Mon, 2010-09-13 at 18:45 +0200, Christoph Derndorfer wrote:
as previously mentioned to Bernie I'm thinking about using the  
international
   spin of Dextrose on the 25 XO-1s that we're using in our  Austrian pilot
   project.   IIRC correctly those XO-1s are currently running 802 and now
   I was  wondering whether there was a way to upgrade them to Dextrose without
erasing the Journal (e.g. something like olpc-update but using  Dextrose
   rather OLPC's 10.1.2). [...] 

Content analysis details:   (6.5 points, 5.0 required)

 pts rule name  description
 -- --
 3.6 RCVD_IN_PBLRBL: Received via a relay in Spamhaus PBL
[41.138.229.81 listed in zen.spamhaus.org]
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
[41.138.229.81 listed in bb.barracudacentral.org]
 1.0 SPF_SOFTFAIL   SPF: sender does not match SPF record (softfail)
 0.4 RDNS_DYNAMIC   Delivered to internal network by host with
dynamic-looking rDNS


---BeginMessage---
On Mon, 2010-09-13 at 18:45 +0200, Christoph Derndorfer wrote:
 as previously mentioned to Bernie I'm thinking about using the
 international spin of Dextrose on the 25 XO-1s that we're using in our
 Austrian pilot project.
 
 IIRC correctly those XO-1s are currently running 802 and now I was
 wondering whether there was a way to upgrade them to Dextrose without
 erasing the Journal (e.g. something like olpc-update but using
 Dextrose rather OLPC's 10.1.2).

For the first upgrade in Paraguay, we used two very simple shell scripts
to backup the journal to a tarball on a usb stick.

The procedure was somewhat cumbersome:

1) plug in usb stick
2) open terminal
3) /media/USBSTICK/backup_script
4) wait
5) cleanly unmount usb stick
6) reboot
7) flash
8) boot into sugar
9) open terminal
10) /media/USBSTICK/restore_script

Of course, we did this only for specific laptops where the user wanted
to preserve information. Many users were perfectly  with erasing their
journal completely. Some kids asked to save only one or two files.

If you have a schoolserver, then you should already have daily backups
even with 802. You're just missing a restore function.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

---End Message---
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Question about upgrading from 802 to Dextrose

2010-09-13 Thread Bernie Innocenti
Please ignore my (failed) smoke test of spamass-milter :-)

On Mon, 2010-09-13 at 23:01 +0200, Bernie Innocenti wrote:
 Spam detection software, running on the system sunjammer.sugarlabs.org, has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  On Mon, 2010-09-13 at 18:45 +0200, Christoph Derndorfer 
 wrote:
 as previously mentioned to Bernie I'm thinking about using the  
 international
spin of Dextrose on the 25 XO-1s that we're using in our  Austrian pilot
project.   IIRC correctly those XO-1s are currently running 802 and now
I was  wondering whether there was a way to upgrade them to Dextrose 
 without
 erasing the Journal (e.g. something like olpc-update but using  Dextrose
rather OLPC's 10.1.2). [...] 
 
 Content analysis details:   (6.5 points, 5.0 required)
 
  pts rule name  description
  -- --
  3.6 RCVD_IN_PBLRBL: Received via a relay in Spamhaus PBL
 [41.138.229.81 listed in zen.spamhaus.org]
  1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
 [41.138.229.81 listed in bb.barracudacentral.org]
  1.0 SPF_SOFTFAIL   SPF: sender does not match SPF record (softfail)
  0.4 RDNS_DYNAMIC   Delivered to internal network by host with
 dynamic-looking rDNS
 
 
 email message attachment, original message before SpamAssassin
   Forwarded Message 
  From: Bernie Innocenti ber...@codewiz.org
  To: Christoph Derndorfer christoph.derndor...@gmail.com
  Cc: dextr...@lists.sugarlabs.org, Sugar Devel
  Sugar-devel@lists.sugarlabs.org, christoph.derndor...@olpc.at
  Subject: Re: [Dextrose] Question about upgrading from 802 to
  Dextrose
  Date: Mon, 13 Sep 2010 23:01:04 +0200
  
  On Mon, 2010-09-13 at 18:45 +0200, Christoph Derndorfer wrote:
   as previously mentioned to Bernie I'm thinking about using the
   international spin of Dextrose on the 25 XO-1s that we're using in our
   Austrian pilot project.
   
   IIRC correctly those XO-1s are currently running 802 and now I was
   wondering whether there was a way to upgrade them to Dextrose without
   erasing the Journal (e.g. something like olpc-update but using
   Dextrose rather OLPC's 10.1.2).
  
  For the first upgrade in Paraguay, we used two very simple shell scripts
  to backup the journal to a tarball on a usb stick.
  
  The procedure was somewhat cumbersome:
  
  1) plug in usb stick
  2) open terminal
  3) /media/USBSTICK/backup_script
  4) wait
  5) cleanly unmount usb stick
  6) reboot
  7) flash
  8) boot into sugar
  9) open terminal
  10) /media/USBSTICK/restore_script
  
  Of course, we did this only for specific laptops where the user wanted
  to preserve information. Many users were perfectly  with erasing their
  journal completely. Some kids asked to save only one or two files.
  
  If you have a schoolserver, then you should already have daily backups
  even with 802. You're just missing a restore function.
  
 ___
 Dextrose mailing list
 dextr...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/dextrose

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [ASLO] Release Turtle Blocks-98

2010-09-13 Thread Sugar Labs Activities
Activity Homepage:
http://activities.sugarlabs.org/addon/4027

Sugar Platform:
0.82 - 0.90

Download Now:
http://activities.sugarlabs.org/downloads/file/27037/turtle_art-98.xo

Release notes:
* fixed palette selection regression in non-Sugar version


Sugar Labs Activities
http://activities.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] VncLauncher can't find the needed libs on OLPC's 10.1.2 release

2010-09-13 Thread James Cameron
On Mon, Sep 13, 2010 at 01:40:27PM -0600, Daniel Drake wrote:
 On 13 September 2010 01:25, James Cameron qu...@laptop.org wrote:
  Should we add libvncserver to the 10.1.3 build? ?It seems to install
  fine using yum. ?The libvncserver.so.0 after install has the same md5sum
  as the one in vnclauncher-7.xo.
 
 For meeting activitity dependencies I think we should limit ourselves
 to things that we have shipped in the past, and things listed on the
 sugar platform page.

I agree, but I thought the original poster was saying that the problem
was caused by the update to 10.1.2 ... looking back through that post
and examining 8.2.1 only the vnc and vnc-libs packages are installed,
providing the vncviewer binary, yet on 10.1.2 the binary is not present.
That may be an issue for 10.1.3, but I've not heard any request for it
yet.

VncLauncher doesn't use the vncviewer binary; it is a VNC server
activity.  It embeds an x11vnc binary and associated libraries.

I don't see how this problem was caused by 10.1.2, so I remain curious.

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Question about upgrading from 802 to Dextrose

2010-09-13 Thread Christoph Derndorfer
On Tue, Sep 14, 2010 at 12:13 AM, Bernie Innocenti ber...@codewiz.orgwrote:

    Forwarded Message 
   From: Bernie Innocenti ber...@codewiz.org
   To: Christoph Derndorfer christoph.derndor...@gmail.com
   Cc: dextr...@lists.sugarlabs.org, Sugar Devel
   Sugar-devel@lists.sugarlabs.org, christoph.derndor...@olpc.at
   Subject: Re: [Dextrose] Question about upgrading from 802 to
   Dextrose
   Date: Mon, 13 Sep 2010 23:01:04 +0200
  
   On Mon, 2010-09-13 at 18:45 +0200, Christoph Derndorfer wrote:
as previously mentioned to Bernie I'm thinking about using the
international spin of Dextrose on the 25 XO-1s that we're using in
 our
Austrian pilot project.
   
IIRC correctly those XO-1s are currently running 802 and now I was
wondering whether there was a way to upgrade them to Dextrose without
erasing the Journal (e.g. something like olpc-update but using
Dextrose rather OLPC's 10.1.2).
  
   For the first upgrade in Paraguay, we used two very simple shell
 scripts
   to backup the journal to a tarball on a usb stick.
  
   The procedure was somewhat cumbersome:
  
   1) plug in usb stick
   2) open terminal
   3) /media/USBSTICK/backup_script
   4) wait
   5) cleanly unmount usb stick
   6) reboot
   7) flash
   8) boot into sugar
   9) open terminal
   10) /media/USBSTICK/restore_script


Thanks a lot for these instructions.


   Of course, we did this only for specific laptops where the user wanted
   to preserve information. Many users were perfectly  with erasing their
   journal completely. Some kids asked to save only one or two files.
  
   If you have a schoolserver, then you should already have daily backups
   even with 802. You're just missing a restore function.


Interesting, I wasn't aware of that.

If I remember correctly I had set up XS 0.5 at the school, how would I find
out whether the backups were made and if so how do I restore them to the XOs
after I install Dextrose on them?

Thanks again for all your help,
Christoph

-- 
Christoph Derndorfer
co-editor, olpcnews
url: www.olpcnews.com
e-mail: christ...@olpcnews.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH sugar-0.84] fix journal scan of external media, dev.laptop.org #10140

2010-09-13 Thread James Cameron
Update the progress bar regularly and prevent the UI from stalling
during a scan.

Avoid following recursive symlinks, and symlinks that point outside the
filesystem being scanned.

Check for MIME type of file last, to improve performance.

Do not report permission denied errors.

Reviewed-By: Sascha Silbe sascha-...@silbe.org
---
 src/jarabe/journal/model.py |  143 +-
 1 files changed, 99 insertions(+), 44 deletions(-)

diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 50e8dc1..6b1011c 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, One Laptop Per Child
+# Copyright (C) 2007-2010, One Laptop per Child
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,10 +16,11 @@
 
 import logging
 import os
+import errno
 from datetime import datetime
 import time
 import shutil
-from stat import S_IFMT, S_IFDIR, S_IFREG
+from stat import S_IFLNK, S_IFMT, S_IFDIR, S_IFREG
 import traceback
 import re
 
@@ -258,7 +259,9 @@ class InplaceResultSet(BaseResultSet):
 BaseResultSet.__init__(self, query, cache_limit)
 self._mount_point = mount_point
 self._file_list = None
-self._pending_directories = 0
+self._pending_directories = []
+self._visited_directories = []
+self._pending_files = []
 self._stopped = False
 
 query_text = query.get('query', '')
@@ -283,7 +286,10 @@ class InplaceResultSet(BaseResultSet):
 
 def setup(self):
 self._file_list = []
-self._recurse_dir(self._mount_point)
+self._pending_directories = [self._mount_point]
+self._visited_directories = []
+self._pending_files = []
+gobject.idle_add(self._scan)
 
 def stop(self):
 self._stopped = True
@@ -317,51 +323,100 @@ class InplaceResultSet(BaseResultSet):
 
 return entries, total_count
 
-def _recurse_dir(self, dir_path):
+def _scan(self):
 if self._stopped:
+return False
+
+self.progress.send(self)
+
+if self._pending_files:
+self._scan_a_file()
+return True
+
+if self._pending_directories:
+self._scan_a_directory()
+return True
+
+self.setup_ready()
+self._visited_directories = []
+return False
+
+def _scan_a_file(self):
+full_path = self._pending_files.pop(0)
+
+try:
+stat = os.lstat(full_path)
+except OSError, e:
+if e.errno != errno.ENOENT:
+logging.exception(
+'Error reading metadata of file %r', full_path)
+return
+
+if S_IFMT(stat.st_mode) == S_IFLNK:
+try:
+link = os.readlink(full_path)
+except OSError, e:
+logging.exception(
+'Error reading target of link %r', full_path)
+return
+
+if not os.path.abspath(link).startswith(self._mount_point):
+return
+
+try:
+stat = os.stat(full_path)
+
+except OSError, e:
+if e.errno != errno.ENOENT:
+logging.exception(
+'Error reading metadata of linked file %r', full_path)
+return
+
+if S_IFMT(stat.st_mode) == S_IFDIR:
+id_tuple = stat.st_ino, stat.st_dev
+if not id_tuple in self._visited_directories:
+self._visited_directories.append(id_tuple)
+self._pending_directories.append(full_path)
+return
+
+if S_IFMT(stat.st_mode) != S_IFREG:
+return
+
+if self._regex is not None and \
+not self._regex.match(full_path):
+return
+
+if self._date_start is not None and self.st_mtime  self._date_start:
+return
+
+if self._date_end is not None and self.st_mtime  self._date_end:
+return
+
+if self._mime_types:
+mime_type = gio.content_type_guess(filename=full_path)
+if mime_type not in self._mime_types:
+return
+
+file_info = (full_path, stat, int(stat.st_mtime))
+self._file_list.append(file_info)
+
+return
+
+def _scan_a_directory(self):
+dir_path = self._pending_directories.pop(0)
+
+try:
+entries = os.listdir(dir_path)
+except OSError, e:
+if e.errno != errno.EACCES:
+logging.exception('Error reading directory %r', dir_path)
 return
 
-for entry in os.listdir(dir_path):
+for entry in entries:
 if entry.startswith('.'):
 continue
-full_path = dir_path + '/' + entry
-try:
-stat = 

[Sugar-devel] [PATCH] fix journal scan of external media, dev.laptop.org #10140

2010-09-13 Thread James Cameron
Update the progress bar regularly and prevent the UI from stalling
during a scan.  Avoid following recursive symlinks, and symlinks that
point outside the filesystem being scanned.  Do not check for MIME type
if file is excluded for other filter reasons.  Do not report permission
denied errors.

Tested on Sugar 0.88 using Ubuntu Sugar Remix (maverick).
---
 src/jarabe/journal/model.py |  150 ---
 1 files changed, 97 insertions(+), 53 deletions(-)

diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 81ca7d4..5ba3a76 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, One Laptop Per Child
+# Copyright (C) 2007-2010, One Laptop per Child
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,10 +16,11 @@
 
 import logging
 import os
+import errno
 from datetime import datetime
 import time
 import shutil
-from stat import S_IFMT, S_IFDIR, S_IFREG
+from stat import S_IFLNK, S_IFMT, S_IFDIR, S_IFREG
 import re
 from operator import itemgetter
 
@@ -220,7 +221,9 @@ class InplaceResultSet(BaseResultSet):
 BaseResultSet.__init__(self, query, page_size)
 self._mount_point = mount_point
 self._file_list = None
-self._pending_directories = 0
+self._pending_directories = []
+self._visited_directories = []
+self._pending_files = []
 self._stopped = False
 
 query_text = query.get('query', '')
@@ -247,7 +250,10 @@ class InplaceResultSet(BaseResultSet):
 
 def setup(self):
 self._file_list = []
-self._recurse_dir(self._mount_point)
+self._pending_directories = [self._mount_point]
+self._visited_directories = []
+self._pending_files = []
+gobject.idle_add(self._scan)
 
 def stop(self):
 self._stopped = True
@@ -287,62 +293,100 @@ class InplaceResultSet(BaseResultSet):
 
 return entries, total_count
 
-def _recurse_dir(self, dir_path):
-self._pending_directories += 1
-gobject.idle_add(self._idle_recurse_dir, dir_path)
-
-def _idle_recurse_dir(self, dir_path):
-try:
-self._real_recurse_dir(dir_path)
-finally:
-self._pending_directories -= 1
-if self._pending_directories == 0:
-self.setup_ready()
-
-def _real_recurse_dir(self, dir_path):
+def _scan(self):
 if self._stopped:
+return False
+
+self.progress.send(self)
+
+if self._pending_files:
+self._scan_a_file()
+return True
+
+if self._pending_directories:
+self._scan_a_directory()
+return True
+
+self.setup_ready()
+self._visited_directories = []
+return False
+
+def _scan_a_file(self):
+full_path = self._pending_files.pop(0)
+
+try:
+stat = os.lstat(full_path)
+except OSError, e:
+if e.errno != errno.ENOENT:
+logging.exception(
+'Error reading metadata of file %r', full_path)
+return
+
+if S_IFMT(stat.st_mode) == S_IFLNK:
+try:
+link = os.readlink(full_path)
+except OSError, e:
+logging.exception(
+'Error reading target of link %r', full_path)
+return
+
+if not os.path.abspath(link).startswith(self._mount_point):
+return
+
+try:
+stat = os.stat(full_path)
+
+except OSError, e:
+if e.errno != errno.ENOENT:
+logging.exception(
+'Error reading metadata of linked file %r', full_path)
+return
+
+if S_IFMT(stat.st_mode) == S_IFDIR:
+id_tuple = stat.st_ino, stat.st_dev
+if not id_tuple in self._visited_directories:
+self._visited_directories.append(id_tuple)
+self._pending_directories.append(full_path)
 return
 
+if S_IFMT(stat.st_mode) != S_IFREG:
+return
+
+if self._regex is not None and \
+not self._regex.match(full_path):
+return
+
+if self._date_start is not None and self.st_mtime  self._date_start:
+return
+
+if self._date_end is not None and self.st_mtime  self._date_end:
+return
+
+if self._mime_types:
+mime_type = gio.content_type_guess(filename=full_path)
+if mime_type not in self._mime_types:
+return
+
+file_info = (full_path, stat, int(stat.st_mtime), stat.st_size)
+self._file_list.append(file_info)
+
+return
+
+def _scan_a_directory(self):
+dir_path = self._pending_directories.pop(0)
+
 

[Sugar-devel] SoaS and new netbooks

2010-09-13 Thread Art Hunkins
Does anyone know whether SoaS USB sticks will boot onto the new 7 netbooks 
($100US)?

The OS is WindowsCE 6.0 professional, and there are 3 USB2.0 ports. Video 
resolution is 800x480.

Art Hunkins 

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel