Re: [Sugar-devel] [DESIGN] Extending activity microformat spec to include optional olpc_activity_size
On 30 November 2010 07:11, Bernie Innocenti ber...@codewiz.org wrote: Each GET, even if content is in the squid cache requires a remote HTTP query to check for stale data in the cache. With the typical ping times of 500-1000ms, you end up waiting a couple of seconds. Sure, we could special-case .xo bundles in Squid to avoid the extra check, since the bundle name changes when a new version of the bundle is released. Yet another optimization kludge. Ah, forgot another important detail! On ASLO, query to files are being redirected to the mirrors! So checking for the size would involve 2 queries. True, but distributing the bundles *to* the schoolservers is still on a do-it-yourself basis, with rsync scripts, cronjobs, puppet and all the associated complexity. Yet this is well documented and widely implemented practice. (There isn't another present day option that scales) Isn't the transparent web cache already a good enough solution for activity distribution? Seems to me like you just made the argument its not It also doesn't work well for the first user who downloads the activities (especially when there are big ones like Scratch), stops working completely when the connectivity goes down even if everything is cached, and doesn't work at all with offline schools. It is easy to work with the XS here, just drop activity files in a directory or put them on a USB disk within a certain directory and plug it into the XS. It seems to me that this whole discussion is a bit bogus anyway, since (judging by later messages in this thread) Anish's code was querying all activity metadata (like size) even when it had nothing to do. So if you had 31 activities installed, and it queried the group page and discovred that 0 updates were available, the code would still query make 31 queries (determining file sizes) for no reason. I figure that if he corrects this behaviour then the problem is pretty much solved (or at least deserves re-evaluation). Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] FEATURE REQUEST : Write_to_journal_anytime
Excerpts from anubhav's message of Tue Nov 30 06:49:42 +0100 2010: You break threading by supplying an invalid message id in the following headers: In-Reply-To: no References: no This makes it rather hard for me to review your patch. If you'd like me to review your patch, please submit it again without passing --in-reply-to=no to git send-email. You can also adjust the subject. The patch isn't a feature request, it's an implementation of a feature. A better summary of what your patch does would be: Add button in activity toolbar to invoke the Name Alert I'm also not exactly fond of the Name Alert. I'd much rather have that button invoke the Journal details view instead. But that's my personal opinion, so I recommend you wait until the Design Team has agreed on a choice. 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
Re: [Sugar-devel] [PATCH sugar] Journal list view: don't choke on invalid or incomplete metadata (SL#1408)
Excerpts from Simon Schampijer's message of Mon Nov 29 14:40:47 +0100 2010: Acked-by: Simon Schampijer si...@schampijer.de Pushed as 79c85ed (master) / 5fdb4f3 (sucrose-0.90), thanks! +try: +progress = int(float(metadata.get('progress', 100))) +except (TypeError, ValueError): +progress = 100 +self._cached_row.append(progress) I think it is ok, to not log here an error indeed. The int(float) cast first looked strange, but is ok here. Side-note: Actually, do we need to store the progress in float...? Browse doesn't store it as float, but since any activity might add a progress value, we should be liberal in what we accept. 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
Re: [Sugar-devel] [PATCH sugar] Journal details view: don't choke on invalid timestamp (SL#1590, SL#2208)
Excerpts from Simon Schampijer's message of Mon Nov 29 14:14:21 +0100 2010: Acked-by: Simon Schampijer si...@schampijer.de Pushed as 923a7fc (master) / 760deeb (sucrose-0.90), 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
Re: [Sugar-devel] [PATCH sugar-toolkit] XoColor: don't choke if passed the wrong type (SL#1408)
Excerpts from Simon Schampijer's message of Mon Nov 29 11:22:49 +0100 2010: Acked-by: Simon Schampijer si...@schampijer.de Pushed as 3b0e761 (master) / a56f9b7 (sucrose-0.90), 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
Re: [Sugar-devel] [PATCH sugar] about my computer, check wlan0 before eth0
Excerpts from James Cameron's message of Mon Nov 29 00:25:36 +0100 2010: Apart from your desire for me to do more work to create a perfect solution, was the patch that I proposed worthy of being merged if only to incrementally improve the existing code? Apart from not working on my system (because of the differently named interface) the patch was fine. I am currently testing a patch that implements what I suggested. If for some reason my patch gets rejected, I'd be happy to merge yours. 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
Re: [Sugar-devel] Bundle format
On 30.11.2010, at 01:01, C. Scott Ananian wrote: On Mon, Nov 22, 2010 at 11:07 PM, Bernie Innocenti ber...@codewiz.org wrote: On Mon, 2010-11-22 at 10:53 -0500, C. Scott Ananian wrote: (oh, and the .zip file already has a checksum, it's not clear why you'd need another one.) Ah, cool... but I guess it's not a cryptographically secure one, right? Cryptographic security can be added to a manifest in the same way it is done for jar files, for android zip files, and for any number of other zip-based archives. In fact, it should be done *exactly* as in one of those other formats. I believe I suggested 'jar'. Use the existing tools, Luke. --scott +1 - Bert - ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Share Journal entries over external devices #1636
On 11/30/2010 11:01 AM, Simon Schampijer wrote: On 11/26/2010 04:33 PM, Sascha Silbe wrote: Excerpts from simon's message of Thu Nov 25 10:51:16 +0100 2010: metadata and preview of an entry are stored in hidden files. For example when copying an entry homework.pdf to the device a file called .homework.pdf.metadata and .homework.pdf.preview will be stored on the device as well. Those will be read in when copying an entry from the external device to a Journal. I'm not yet convinced of that approach. How do you detect and handle stale metadata and preview files? Especially since you hide the files (how do non-Unix OSs handle dot-files, BTW?) On a Windows XP machine I had access to the dot-files. Windows does handle the visibility of a file with an attribute. On OSX the dot-files are not shown. Regards, Simon Note about the hidden files on windows: I looked a bit around, and there is no way to set that attribute on Linux, AFAIK. To reduce the number of visible secondary files on the stick, we could pack them into one hidden folder as well. We discussed the two approaches (hidden files with the metadata per entry vs archived file (like JEBs [1])) a bit yesterday. Here is a short summary: Use Cases: * share a Journal entry with your classmate using a storage device (alternatives are here the file transfer option in the Journal) * backup your Journal entry on a storage device, or transfer it over a storage device to another machine, this includes writing and reading (alternatives here are the Server side backup) * the backup/restore has to be possible over several Sugar versions (upgrade path) * copy the picture you painted to your storage device and show it to your mom on her computer Current status: AFAIK the school server currently handles the backup by rsync [2] (Martin?). Are there future plans for fine grained backup (per entry)? Sascha seem to use the JEB in his activities for backup and restore [3][4]. Sascha are those used in a distribution already? Used by a deployment? It seem as well that some work has been going into Dextrose to provide backing up functionality [5]. Bernie, is this actually available in Dextrose? Regards, Simon [1] http://wiki.laptop.org/go/Journal_entry_bundles [2] http://wiki.laptop.org/go/XS_Blueprints:Datastore_Simple_Backup_and_Restore [3] http://activities.sugarlabs.org/en-US/sugar/addon/4326 [4] http://activities.sugarlabs.org/en-US/sugar/addon/4327 [5] http://wiki.sugarlabs.org/go/Features/Backup_and_Restore ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH sugar] About my computer: use NetworkManager to acquire list of devices
The hardcoded name 'eth0' that is used for querying the firmware version doesn't match the interface name actually assigned to the wireless device in recent OLPC builds or on most non-XO hardware. Querying NetworkManager for the list of devices will work even on systems where the interface has been renamed during boot (persistent device names). If there are multiple wireless interfaces, firmware information for all of them will be shown (prefixed by interface name). Signed-off-by: Sascha Silbe sascha-...@silbe.org --- extensions/cpsection/aboutcomputer/model.py | 72 +++ 1 files changed, 62 insertions(+), 10 deletions(-) diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py index e3b9687..3219dd1 100644 --- a/extensions/cpsection/aboutcomputer/model.py +++ b/extensions/cpsection/aboutcomputer/model.py @@ -22,9 +22,17 @@ import subprocess from gettext import gettext as _ import errno +import dbus + from jarabe import config +_NM_SERVICE = 'org.freedesktop.NetworkManager' +_NM_PATH = '/org/freedesktop/NetworkManager' +_NM_IFACE = 'org.freedesktop.NetworkManager' +_NM_DEVICE_IFACE = 'org.freedesktop.NetworkManager.Device' +_NM_DEVICE_TYPE_WIFI = 2 + _logger = logging.getLogger('ControlPanel - AboutComputer') _not_available = _('Not available') @@ -94,18 +102,62 @@ def print_firmware_number(): print get_firmware_number() -def get_wireless_firmware(): +def _get_wireless_interfaces(): try: -info = subprocess.Popen(['/usr/sbin/ethtool', '-i', 'eth0'], -stdout=subprocess.PIPE).stdout.readlines() -except OSError: +bus = dbus.SystemBus() +manager_object = bus.get_object(_NM_SERVICE, _NM_PATH) +network_manager = dbus.Interface(manager_object, _NM_IFACE) +except dbus.DBusException: +_logger.warning('Cannot connect to NetworkManager, falling back to' +' static list of devices') +return ['wlan0', 'eth0'] + +interfaces = [] +for device_path in network_manager.GetDevices(): +device_object = bus.get_object(_NM_SERVICE, device_path) +properties = dbus.Interface(device_object, +'org.freedesktop.DBus.Properties') +device_type = properties.Get(_NM_DEVICE_IFACE, 'DeviceType') +if device_type != _NM_DEVICE_TYPE_WIFI: +continue + +interfaces.append(properties.Get(_NM_DEVICE_IFACE, 'Interface')) + +return interfaces + + +def get_wireless_firmware(): +environment = os.environ.copy() +environment['PATH'] = '%s:/usr/sbin' % (environment['PATH'], ) +firmware_info = {} +for interface in _get_wireless_interfaces(): +try: +output = subprocess.Popen(['ethtool', '-i', interface], + stdout=subprocess.PIPE, + env=environment).stdout.readlines() +except OSError: +_logger.exception('Error running ethtool for %r', interface) +continue + +try: +version = ([line for line in output +if line.startswith('firmware')][0].split()[1]) +except IndexError: +_logger.exception('Error parsing ethtool output for %r', + interface) +continue + +firmware_info[interface] = version + +if not firmware_info: return _not_available -try: -wireless_firmware = [line for line in info - if line.startswith('firmware')][0].split()[1] -except IndexError: -wireless_firmware = _not_available -return wireless_firmware + +if len(firmware_info) == 1: +return firmware_info.values()[0] + +return ', '.join([_('%(interface)s: %(version)s') % + {'interface': interface, 'version': version} + for interface, version in firmware_info.items()]) def print_wireless_firmware(): -- 1.7.2.3 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Share Journal entries over external devices #1636
On Tue, Nov 30, 2010 at 8:27 AM, Simon Schampijer si...@schampijer.de wrote: Note about the hidden files on windows: I looked a bit around, and there is no way to set that attribute on Linux, AFAIK. IIRC, Windows hides .files . In any case, there are Windows laptops around here so I can run a quick test in a couple hs. AFAIK the school server currently handles the backup by rsync [2] (Martin?). Are there future plans for fine grained backup (per entry)? It uses rsync and then the XS has code to read the metadata (for listings) and then auto-assembles JEBs for restore. So from Sugar's PoV, the XS uses JEBs. cheers, m -- mar...@laptop.org -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] fix journal scan of external media, dev.laptop.org #10140
Excerpts from James Cameron's message of Tue Nov 30 01:14:14 +0100 2010: [src/jarabe/journal/model.py] +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 Both occurrences of self.st_mtime need to read stat.st_mtime instead (found by pylint). With those changes: Tested-By: Sascha Silbe sascha-...@silbe.org Reviewed-By: Sascha Silbe sascha-...@silbe.org 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
Re: [Sugar-devel] [PATCH] Sugar Ad-hoc icons show in search results when connect/disconnect to AP OLPC #10412
Excerpts from Simon Schampijer's message of Wed Nov 03 15:20:31 +0100 2010: When searching for an AP the Sugar ad-hoc networks are greyed out (if their name does not contain the search string). When then trying to connect to an AP the Sugar ad-hoc networks get colored again. The patch does make sure that the color is not set by each update and that the member change does not trigger setting the color of the icon. Tested-By: Sascha Silbe sascha-...@silbe.org 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 Tux Paint-5
Activity Homepage: http://activities.sugarlabs.org/addon/4088 Sugar Platform: 0.82 - 0.90 Download Now: http://activities.sugarlabs.org/downloads/file/27134/tux_paint-5.xo Release notes: * Release contains only i486 binaries * Revert save button to save current image (not keep) * Revert open button to import image from the Journal * Save image preview in Journal objects * Set correct MIME type for created Journal objects * List of MIME types supported my activity 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 v3 sugar] Run Sugar-Emulator in fullscreen by default if the screen is =800x600 (SL #2180)
Excerpts from Dipankar Patro's message of Mon Sep 27 20:35:35 +0200 2010: Previously some bottom part of sugar emulator window was pushed out of viewing area at 800x600 system resolution. The patch opens Sugar-emulator in fullscreen mode by default for resolutions = 800x600 to avoid the above mentioned situation. Pushed as 1d069eb (master) / 1cce2c7 (sucrose-0.90). Thanks for the patch! 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
Re: [Sugar-devel] [PATCH v4 sugar] Time out on registration process to prevent indefinite UI hang (SL#2289)
Excerpts from James Cameron's message of Tue Oct 12 00:30:25 +0200 2010: I see no ack. I see no commit. This has been pushed to master on 2010-10-15 as ba20b1c by Tomeu and to sucrose-0.90 on 2010-10-26 as f297de2 by Simon. 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
Re: [Sugar-devel] [PATCH] Setting logging level of message Gsm connection not set... to warning from exception (SL #2247)
Excerpts from Dipankar Patro's message of Sat Sep 18 19:03:15 +0200 2010: Currently the message appears as an error whereas it is just a warning message. Developer should not get this message an error, so I have set the logging level to warning from exception. Please shorten the summary (subject line) to less than 80 characters. Reviewed-By: Sascha Silbe sascha-...@silbe.org 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] Record Activity and ogg vorbis audio?
Can someone indicate to me a version of Record that outputs ogg vorbis audio (versions = 64 or so should) on SoaS Blueberry and higher (Sugar = 0.86)? I can't find one. (There are various issues: some versions get hung at startup, a few output ogg speex, most of the later ones seem to record, but don't save or play back.) With Sugar 0.84, all is well: SoaS Strawberry works with v64; and both the XO-1.5 and the upgraded XO-1 work with v86. Art Hunkins ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [Dextrose] Fwd: [PATCH] Changed outline of checkbox from grey to black when activated. Ticket #305
Hello, On Tue, 2010-10-26 at 22:25 +0530, Shanjit Singh Jajmann wrote: I have attached the screen shot for the check box without making the changes present in the patch. I have made a new window to test the working of the checkbox. The checkbox seems to be working fine. Please find the two screenshots of the checkbox (both selected and unselected) attached. I just do not understand what the patch is supposed to fix. It seems likely to me that it will break some cases. Could anyone provide a screenshot where the issue is visible or even better, a place where it can be easily reproduced? Without that it is impossible for me to review the patch. Benjamin ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] Avoid popping an empty list in the
Excerpts from Michael Stone's message of Wed May 26 06:27:07 +0200 2010: On Sun, May 23, 2010 at 02:50:16PM -0400, Michael Stone wrote: When you run Sugar with no activities installed, UpdateModel._bundles_to_check is empty. Attempting to unconditionally pop this list results in an IndexError. Instead, the updater should stop trying to update bundles when it determines that it has no more bundles to check. [some changes suggested by James] Good suggestion. AFAICT this hasn't been fixed yet. I would appreciate an updated (single) patch that we can review and merge into master. 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
Re: [Sugar-devel] [PATCH] Simplify the definition of UpdateModel._bundles_to_check.
Excerpts from Michael Stone's message of Sun May 23 20:50:26 +0200 2010: The only purposes of the list comprehension in UpdateModel.check_updates() is to set self._bundles_to_check to a list containing the elements returned by bundleregistry.get_registry(). This purpose can be more succinctly achieved by means of the list() constructor. Reviewed-By: Sascha Silbe sascha-...@silbe.org 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] [DESIGN] Possible camera device settings
Hi Anish, Re your IRC question and http://people.sugarlabs.org/anish/drawing-1.png mockup; I just had another scan through the past design mockups and spotted the below. So the consideration behind a camera device frame icon seems to only have been to allow the user to switch it off or on, I assume as a potential extra aid to privacy: http://wiki.sugarlabs.org/go/Design_Team/Designs/Frame#08 Quote: The camera and microphone icons appear in the Frame anytime an activity (or the OS itself) wishes to make use of them. Their presence here provides a global switch for each, allowing the child to mute a conversation or hide her video stream as necessary, for privacy. This does seem a UI complication that most users would be unlikely to find, or need to use (most would just use the activity controls to stop/start recording or video/audio chat as needed), and potentially cause more support issues (like the recent accidental speaker mute report). As per on IRC, I agree with silbe that extra image controls, if needed, would be best within a specific activity. Ideally they would only be needed in advanced activities with special requirements, perhaps an activity designed for using a microscope camera, or images from a telescope, where you might need to more frequently override the usual default settings. Regards, --Gary ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar] About my computer: use NetworkManager to acquire list of devices
On Tue, Nov 30, 2010 at 02:37:23PM +0100, Sascha Silbe wrote: The hardcoded name 'eth0' that is used for querying the firmware version doesn't match the interface name actually assigned to the wireless device in recent OLPC builds or on most non-XO hardware. Querying NetworkManager for the list of devices will work even on systems where the interface has been renamed during boot (persistent device names). If there are multiple wireless interfaces, firmware information for all of them will be shown (prefixed by interface name). Signed-off-by: Sascha Silbe sascha-...@silbe.org Reviewed-by: James Cameron qu...@laptop.org On XO-1 where there is one physical device, with one instance of firmware, and two network interfaces (eth0, msh0), this may be displayed as two devices with the same firmware version. -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Turtle art crystal radio
Hi all Its been suggested that the XO could be turned into a crystal radio. Any suggestions of an easy way to get data from the microphone socket to the speaker? Tony ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel