ports/64787: [MAINTAINER] deskutils/gdesklets-ltvariations: Fix uptime in clock desklet
Tim Bishop
tim at bishnet.net
Fri Mar 26 22:20:12 UTC 2004
>Number: 64787
>Category: ports
>Synopsis: [MAINTAINER] deskutils/gdesklets-ltvariations: Fix uptime in clock desklet
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 26 14:20:11 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Tim Bishop
>Release: FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD pendennis.ukc.ac.uk 5.2.1-RELEASE-p1 FreeBSD 5.2.1-RELEASE-p1 #1: Thu Mar 4 00:16:43 GMT
>Description:
The LTVUptime sensor used by the clock desklet acquired it's uptime using a
method that didn't work on FreeBSD. This update fixes it.
Apologies for yet another little fix.
Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:
--- gdesklets-ltvariations-0.26_3.patch begins here ---
Index: Makefile
===================================================================
RCS file: /u1/freebsd/cvs/ports/deskutils/gdesklets-ltvariations/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile 26 Mar 2004 16:27:33 -0000 1.3
+++ Makefile 26 Mar 2004 22:16:20 -0000
@@ -7,7 +7,7 @@
PORTNAME= ltvariations
PORTVERSION= 0.26
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= deskutils gnome
MASTER_SITES= http://gdesklets.gnomedesktop.org/files/
PKGNAMEPREFIX= gdesklets-
Index: files/LTVUptime::__init__.py
===================================================================
RCS file: /u1/freebsd/cvs/ports/deskutils/gdesklets-ltvariations/files/LTVUptime::__init__.py,v
retrieving revision 1.1
diff -u -r1.1 LTVUptime::__init__.py
--- files/LTVUptime::__init__.py 21 Mar 2004 18:23:10 -0000 1.1
+++ files/LTVUptime::__init__.py 26 Mar 2004 22:13:56 -0000
@@ -1,5 +1,5 @@
---- __init__.py.bak Sun Mar 21 17:40:07 2004
-+++ __init__.py Sun Mar 21 17:41:40 2004
+--- __init__.py.bak Fri Mar 26 22:08:26 2004
++++ __init__.py Fri Mar 26 22:08:49 2004
@@ -21,7 +21,7 @@
self._set_config_type("update", TYPE_INT, int(interval))
self._set_config_type("format", TYPE_STRING, format)
@@ -9,3 +9,12 @@
self._set_config_type("kernel", TYPE_STRING, commands.getoutput("uname -s"))
self._set_config_type("version", TYPE_STRING, commands.getoutput("uname -r"))
self._set_config_type("processor", TYPE_STRING, commands.getoutput("uname -p"))
+@@ -63,7 +63,7 @@
+
+ def draw_uptime(self, data):
+ if self.__enable[ 0 ] != "0" :
+- uptime = float( commands.getoutput("cat /proc/uptime").split()[0] )
++ uptime = time.time() - float(commands.getoutput("sysctl kern.boottime").split()[4][:-1])
+ d = int( uptime / 60 / 60 / 24 )
+ uptime = uptime - d * 60 * 60 * 24
+ h = int( uptime / 60 / 60 )
--- gdesklets-ltvariations-0.26_3.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list