ports/59389: Maintainer update: deskutils/gdesklets, add few patches and threads now work.
Jeremy Messenger
mezz7 at cox.net
Mon Nov 17 23:10:10 UTC 2003
>Number: 59389
>Category: ports
>Synopsis: Maintainer update: deskutils/gdesklets, add few patches and threads now work.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 17 15:10:06 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Mezz
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:
System: FreeBSD ns1.mezzweb.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Aug 13
22:39:47 CDT 2003 mezz at mezz.mezzweb.com:/usr/obj/usr/src/sys/BSDROCKS i386
>Description:
Many thanks to Franz Klammer <klammer at webonaut.com>, the gDesklets now work
much better. The patches fix the thread and correct read the FreeBSD's system
info for SysInfo such as partition, network and etc.
Bump the PORTREVISION, since it's a important update.
All patches submitted by: Franz Klammer <klammer at webonaut.com>
Clean on pkg-plist by: Me
>How-To-Repeat:
n/a
>Fix:
Add new files:
- files/patch-libdesklets::Disk.py
- files/patch-libdesklets::Memory.py
- files/patch-sensor::Sensor.py
--- gdesklets.diff begins here ---
diff -urN gdesklets.orig/Makefile gdesklets/Makefile
--- gdesklets.orig/Makefile Mon Nov 10 17:24:01 2003
+++ gdesklets/Makefile Mon Nov 17 16:12:09 2003
@@ -7,6 +7,7 @@
PORTNAME= gdesklets
PORTVERSION= 0.24.1
+PORTREVISION= 1
CATEGORIES= deskutils gnome
MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/
DISTNAME= gDesklets-${PORTVERSION}
diff -urN gdesklets.orig/files/patch-libdesklets::Disk.py gdesklets/files/patch-libdesklets::Disk.py
--- gdesklets.orig/files/patch-libdesklets::Disk.py Wed Dec 31 18:00:00 1969
+++ gdesklets/files/patch-libdesklets::Disk.py Mon Nov 17 16:53:19 2003
@@ -0,0 +1,50 @@
+# Many thanks to Alexander Leidinger <netchild at FreeBSD.org> and
+# Franz Klammer <klammer at webonaut.com> for help and create
+# those patches.
+#
+# Note that, this is for now. One of us still need to fix the
+# libgtop to correct read the partition so this patch can be
+# remove.
+
+--- libdesklets/Disk.py.orig Mon Nov 17 13:59:20 2003
++++ libdesklets/Disk.py Mon Nov 17 14:05:34 2003
+@@ -1,6 +1,6 @@
+ import glibtop
+ import polling
+-
++import os
+
+ class Disk:
+
+@@ -13,18 +13,22 @@
+
+ def __poll_partitions(self):
+
+- data = glibtop.get_mountlist(0)
+- partitions = []
+- for size, device, mpoint, fstype in data:
+- if (fstype in ("ext2", "ext3", "msdos", "vfat", "ntfs", "hpfs"
+- "jfs", "reiserfs", "xfs", "qnx4", "adfs", "ffs",
+- "hfs", "befs", "bfs", "efs", "iso9660", "minix",
+- "sysv", "coda", "nfs", "udf", "ufs", "xiafs")):
+- partitions.append((device, mpoint))
++ fd = os.popen("mount -p")
++ data = fd.readlines()
++ fd.close()
++
++ partitions = []
++ for lines in data:
++ fields = lines.strip().replace("\t", " ").split()
++ if (fields[2] in ("ext2", "ext3", "msdos", "vfat", "ntfs", "hpfs"
++ "jfs", "reiserfs", "xfs", "qnx4", "adfs", "ffs",
++ "hfs", "befs", "bfs", "efs", "iso9660", "minix",
++ "sysv", "coda", "nfs", "udf", "ufs", "xiafs")):
++ partitions.append((fields[0], fields[1]))
+ #end for
+
+ return partitions
+-
++
+
+
+ def __poll_size(self, partition):
diff -urN gdesklets.orig/files/patch-libdesklets::Memory.py gdesklets/files/patch-libdesklets::Memory.py
--- gdesklets.orig/files/patch-libdesklets::Memory.py Wed Dec 31 18:00:00 1969
+++ gdesklets/files/patch-libdesklets::Memory.py Mon Nov 17 16:12:09 2003
@@ -0,0 +1,15 @@
+# Many thanks to Alexander Leidinger <netchild at FreeBSD.org> and
+# Franz Klammer <klammer at webonaut.com> for help and create
+# those patches.
+
+--- libdesklets/Memory.py.orig Sun Nov 16 17:02:45 2003
++++ libdesklets/Memory.py Sun Nov 16 17:03:19 2003
+@@ -49,7 +49,7 @@
+
+ # Swap
+ elif (mode == 1):
+- total, used, free = glibtop.get_mem()[:3]
++ total, used, free = glibtop.get_swap()[:3]
+ #for l in lines:
+ # if (l.startswith("SwapTotal:")):
+ # value = l.split()
diff -urN gdesklets.orig/files/patch-libdesklets::Network.py gdesklets/files/patch-libdesklets::Network.py
--- gdesklets.orig/files/patch-libdesklets::Network.py Mon Nov 10 11:21:37 2003
+++ gdesklets/files/patch-libdesklets::Network.py Mon Nov 17 16:12:09 2003
@@ -1,8 +1,9 @@
-# Many thanks to Alexander Leidinger <netchild at FreeBSD.org> for
-# help and create those patches.
+# Many thanks to Alexander Leidinger <netchild at FreeBSD.org> and
+# Franz Klammer <klammer at webonaut.com> for help and create
+# those patches.
---- libdesklets/Network.py.orig Sun Nov 9 00:52:39 2003
-+++ libdesklets/Network.py Sun Nov 9 00:53:05 2003
+--- libdesklets/Network.py.orig Sun Nov 16 15:15:30 2003
++++ libdesklets/Network.py Sun Nov 16 15:18:22 2003
@@ -1,8 +1,8 @@
import polling
import glibtop
@@ -43,9 +44,9 @@
- devices.append(device)
+ if ("FreeBSD" == platform):
+ for lines in data:
-+ fields = lines.strip().strip(":")
++ fields = lines.strip().split(":")
+
-+ if (fields[0] == "lo"):
++ if (fields[0][:2] == "lo"):
+ continue
+ else:
+ device = fields[0]
diff -urN gdesklets.orig/files/patch-sensor::Sensor.py gdesklets/files/patch-sensor::Sensor.py
--- gdesklets.orig/files/patch-sensor::Sensor.py Wed Dec 31 18:00:00 1969
+++ gdesklets/files/patch-sensor::Sensor.py Mon Nov 17 16:50:46 2003
@@ -0,0 +1,14 @@
+# Yay! Many thanks to Franz Klammer <klammer at webonaut.com>,
+# the theads is now work. That make a lot of desklets work now.
+
+--- sensor/Sensor.py.orig Mon Nov 17 16:46:57 2003
++++ sensor/Sensor.py Mon Nov 17 16:48:43 2003
+@@ -134,6 +134,8 @@
+ #
+ def _add_thread(self, threadfunction, *args):
+
++ gtk.threads_init()
++
+ # the thread should not start before setup is complete, therefore
+ # we are using the GTK idle handler
+ def run_thread(threadfunction, args):
diff -urN gdesklets.orig/pkg-plist gdesklets/pkg-plist
--- gdesklets.orig/pkg-plist Mon Nov 10 17:02:06 2003
+++ gdesklets/pkg-plist Mon Nov 17 16:12:09 2003
@@ -1,8 +1,6 @@
bin/gdesklets
bin/gdesklets-display-thumbnailer
-etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/%gconf.xml
etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application at x-gdesklets-display/%gconf.xml
-etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/%gconf.xml
etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application at x-gdesklets-display/%gconf.xml
etc/gconf/schemas/gdesklets-display-thumbnail.schemas
libdata/pkgconfig/gdesklets-core.pc
@@ -152,6 +150,4 @@
@dirrm share/gnome/gdesklets/Displays
@dirrm share/gnome/gdesklets
@dirrm etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers/application at x-gdesklets-display
- at dirrm etc/gconf/gconf.xml.defaults/schemas/desktop/gnome/thumbnailers
@dirrm etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers/application at x-gdesklets-display
- at dirrm etc/gconf/gconf.xml.defaults/desktop/gnome/thumbnailers
--- gdesklets.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list