Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Garg <ajay@activitycentral.com>2012-08-10 10:01:32 (GMT)
committer Ajay Garg <ajay@activitycentral.com>2012-08-10 10:04:26 (GMT)
commitb87bd42d317490781194e300c62086a0fea09ccf (patch)
tree111c694834fc245166576046ad79495f367c0b66
parentf5bf08e8250b78fa72fb296480bc84c0a262508a (diff)
[sugar] au#1563, au#1615: Remove the dependency upon "sugar-client";
PLUS; In case no updates have taken place, provide a NOT-UPDATED message, instead of the default OLPC epoch date.
-rw-r--r--rpms/sugar/0119-au-1563-au-1615-Remove-the-dependency-upon-sugar-cli.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/rpms/sugar/0119-au-1563-au-1615-Remove-the-dependency-upon-sugar-cli.patch b/rpms/sugar/0119-au-1563-au-1615-Remove-the-dependency-upon-sugar-cli.patch
new file mode 100644
index 0000000..388a35f
--- /dev/null
+++ b/rpms/sugar/0119-au-1563-au-1615-Remove-the-dependency-upon-sugar-cli.patch
@@ -0,0 +1,61 @@
+From 5bb268504c10a37214b29ec0914c3161ad0056ac Mon Sep 17 00:00:00 2001
+From: Ajay Garg <ajay@activitycentral.com>
+Date: Fri, 10 Aug 2012 15:22:38 +0530
+Subject: [sugar PATCH] au#1563, au#1615: (i)
+ Remove the dependency upon "sugar-client".
+ (ii)
+ In case no updates have taken place, provide a
+ NOT-UPDATED message, instead of the default
+ OLPC epoch date.
+Organization: Sugar Labs Foundation
+Signed-off-by: Ajay Garg <ajay@activitycentral.com>
+---
+
+
+ extensions/cpsection/aboutcomputer/model.py | 22 ++++++++++------------
+ 1 files changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py
+index 4510af6..f2e04f7 100644
+--- a/extensions/cpsection/aboutcomputer/model.py
++++ b/extensions/cpsection/aboutcomputer/model.py
+@@ -262,26 +262,24 @@ def get_last_updated_on_field():
+ # Get the number of UNIX seconds of the last update date.
+ last_update_unix_seconds = {}
+ try:
+- SERVICE_NAME = 'org.sugarlabs.client.System'
+- SERVICE_PATH = '/org/sugarlabs/client/System'
+- SERVICE_INTERFACE = 'org.sugarlabs.client.System'
+-
+- bus_class = dbus.SystemBus()
+- system_obj = bus_class.get_object(SERVICE_NAME, SERVICE_PATH)
+- system_iface = dbus.Interface(system_obj, SERVICE_INTERFACE)
+- system_props = dbus.Interface(system_iface,
+- dbus.PROPERTIES_IFACE)
+- last_update_unix_seconds = system_props.Get(SERVICE_INTERFACE,
+- 'LastUpdate')
++ last_update_unix_seconds = int(os.stat('/var/lib/rpm/Packages').st_mtime)
+ except:
+ msg_str = _('Information not available.')
+ _logger.exception(msg_str)
+ return msg_str
+
++
++ NO_UPDATE_MESSAGE = _('I have not been able to search for updates. ' +
++ '\nPlease check your Internet connection and ' +
++ 'proxy settings.')
++
+ # Check once again that 'last_update_unix_seconds' is not empty.
+ # You never know !
+ if not last_update_unix_seconds:
+- return _('No update yet!')
++ return NO_UPDATE_MESSAGE
++
++ if int(last_update_unix_seconds) == 1194004800:
++ return NO_UPDATE_MESSAGE
+
+ # If we reached here, we have the last-update-time, but it's in
+ # timestamp format.
+--
+1.7.4.4
+