[Python-apps-commits] r2834 - in packages/screenlets/trunk/debian (10 files)
gilir-guest at users.alioth.debian.org
gilir-guest at users.alioth.debian.org
Fri May 1 23:27:16 UTC 2009
Date: Friday, May 1, 2009 @ 23:27:16
Author: gilir-guest
Revision: 2834
Add some patches to fix Ubuntu bugs
Added:
packages/screenlets/trunk/debian/patches/14-configuration-save.patch
packages/screenlets/trunk/debian/patches/15-nowplaying-mpd-try.patch
packages/screenlets/trunk/debian/patches/16-clearweather-catch-connection-error.patch
packages/screenlets/trunk/debian/patches/17-nowplaying-amarok.patch
packages/screenlets/trunk/debian/patches/18-nowplaying-rb-playing.patch
packages/screenlets/trunk/debian/patches/19-remove-autostart-output.patch
packages/screenlets/trunk/debian/pyversions
Modified:
packages/screenlets/trunk/debian/changelog
packages/screenlets/trunk/debian/control
packages/screenlets/trunk/debian/patches/series
Modified: packages/screenlets/trunk/debian/changelog
===================================================================
--- packages/screenlets/trunk/debian/changelog 2009-05-01 18:49:39 UTC (rev 2833)
+++ packages/screenlets/trunk/debian/changelog 2009-05-01 23:27:16 UTC (rev 2834)
@@ -1,12 +1,27 @@
screenlets (0.1.2-6) UNRELEASED; urgency=low
* debian/rules: Replace simple-patchsys by quilt.
- * debian/control: Build-depends on quilt.
+ * debian/control:
+ - Build-depends on quilt.
+ - Remove X{B,S}-Python-Version.
+ * debian/pyversions : Add compatible versions.
* debian/patches:
- 13-opacity-option.patch: Disable the opacity option if the screen
is not composited (Closes: #518179).
+ - 14-configuration-save.patch: From Ubuntu, save and restore the
+ configuration file in some cases. (LP: #345359)
+ - 15-nowplaying-mpd-try.patch: Try to connect to mdp instead of forcing
+ the connection. (LP: #269256)
+ - 16-clearweather-catch-connection-error.patch: From Ubuntu, catch
+ connection error on update (thanks Kjell Braden for the patch).
+ (LP: #264809)
+ - 17-nowplaying-disable-amarok.patch: Disable Amarok 1.X support.
+ - 18-nowplaying-rb-playing.patch: Avoid Dbus exception when checking
+ if the player is playing.
+ - 19-remove-autostart-output.patch: Remove output when screenlets are
+ autostarted. (LP: #318248)
- Update patches to apply with quilt.
- * debian/README.source: Replace by the quilt one.
+ * debian/README.source: Replace by the quilt one.
-- Julien Lavergne <julien.lavergne at gmail.com> Tue, 28 Apr 2009 00:21:57 +0200
Modified: packages/screenlets/trunk/debian/control
===================================================================
--- packages/screenlets/trunk/debian/control 2009-05-01 18:49:39 UTC (rev 2833)
+++ packages/screenlets/trunk/debian/control 2009-05-01 23:27:16 UTC (rev 2834)
@@ -11,7 +11,6 @@
doc-base
Standards-Version: 3.8.1
Homepage: http://screenlets.org
-XS-Python-Version: >= 2.4
Vcs-Svn: svn://svn.debian.org/python-apps/packages/screenlets/trunk
Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/screenlets/trunk/
@@ -38,7 +37,6 @@
tomboy,
gnome-orca,
xfconf (>= 4.5.93)
-XB-Python-Version: ${python:Versions}
Description: Widget-like mini-applications for GNOME
Screenlets are small owner-drawn applications (written in Python) that can be
described as "the virtual representation of things lying/standing around on
Added: packages/screenlets/trunk/debian/patches/14-configuration-save.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/14-configuration-save.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/14-configuration-save.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,66 @@
+#upstream: https://bugs.launchpad.net/screenlets/+bug/345359
+
+Index: trunk/src/lib/backend.py
+===================================================================
+--- trunk.orig/src/lib/backend.py 2009-04-28 00:34:32.000000000 +0200
++++ trunk/src/lib/backend.py 2009-04-28 00:36:41.000000000 +0200
+@@ -217,30 +217,38 @@
+ lst.append([oname, self.__instances[id][oname]])
+ # and save them (if any)
+ if len(lst) > 0:
+- backup = ''
+- try:
+- backup = open(self.path + id + '.ini', 'r')
+- backup.close()
+- except:pass
+- try:
+- # In here something strage appends , sometimes it opens the file , then it cant write to it so it writes and empty file reseting all settings
+-
+- f = open(self.path + id + '.ini', 'w')
+- for el in lst:
+- f.write(el[0] + '=' + el[1] + "\n")
+- f.close()
+- print "OK"
+- except:
+- if backup != '' and os.path.exists(self.path + id + '.ini'):
+- try:
+- backup_restore = open(self.path + id + '.ini', 'w')
+- backup_restore.write(backup)
+- backup_restore.close()
+- except:pass
+- print _("error while saving config: %s %s") % ( oname , self.path)
++ self.__save_settings (self.path + id + '.ini', lst)
+ # clear queue
+ self.__queue = []
+ # NOT continue the timeout-function (!!!!!)
+ return False
+
++ def __save_settings (self, filename, lst):
++ """ Try to save settings in a file, first save this to a temporal file avoid encodings a disk full errors """
++ filenametmp = filename + '.tmp'
++ isOk = True
++ newini = ''
++ try:
++ # Is posible to fail with encoding error?
++ for el in lst:
++ newini += el[0] + '=' + el[1] + "\n"
++ except:
++ isOk = False
++ print _("error while convert config to string (encoding error?), I lose your last changes :'(")
++
++ if isOk:
++ # Write the new settings to a temporal file, disk full, encoding, rights may fails at this point.
++ try:
++ open(filenametmp, 'w').write(newini)
++ except:
++ isOk = False
++ print _("error while saving configuration to a temporal file %s, disk full?") % filenametmp
++
++ if isOk:
++ # Move saved settings to definitive configuration file, disk error o incorrect rights may fails at this point.
++ try:
++ import shutil
++ shutil.move(filenametmp, filename)
++ except:
++ print _("error while moving temporal file to configuration file, %s > %s, sorry, I lose your settings. :'(") % (filenametmp, filename)
+
Added: packages/screenlets/trunk/debian/patches/15-nowplaying-mpd-try.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/15-nowplaying-mpd-try.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/15-nowplaying-mpd-try.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,23 @@
+#Upstream : https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/269256
+
+Index: trunk/src/lib/plugins/mpdclient2.py
+===================================================================
+--- trunk.orig/src/lib/plugins/mpdclient2.py 2009-04-29 23:26:50.000000000 +0200
++++ trunk/src/lib/plugins/mpdclient2.py 2009-04-29 23:46:35.000000000 +0200
+@@ -325,9 +325,10 @@
+ password = kw_password
+ if kw_host:
+ host = kw_host
+-
+- conn = mpd_connection(host, port)
+- if password:
+- conn.password(password)
+- return conn
+-
++ try:
++ conn = mpd_connection(host, port)
++ if password:
++ conn.password(password)
++ return conn
++ except:
++ return False
Added: packages/screenlets/trunk/debian/patches/16-clearweather-catch-connection-error.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/16-clearweather-catch-connection-error.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/16-clearweather-catch-connection-error.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,64 @@
+#Upstream https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/264809
+
+Index: trunk/src/share/screenlets/ClearWeather/ClearWeatherScreenlet.py
+===================================================================
+--- trunk.orig/src/share/screenlets/ClearWeather/ClearWeatherScreenlet.py 2009-04-28 01:03:15.000000000 +0200
++++ trunk/src/share/screenlets/ClearWeather/ClearWeatherScreenlet.py 2009-04-28 01:04:54.000000000 +0200
+@@ -11,6 +11,7 @@
+
+ import re
+ from urllib import urlopen
++import socket # for socket.error
+ import screenlets
+ from screenlets.options import StringOption, BoolOption, ColorOption, FontOption
+ import pygtk
+@@ -164,8 +165,9 @@
+ dcstop = data.find('</day>',dcstart) #####10-day forecast
+ day = data[dcstart:dcstop]
+ forecast.append(self.tokenizeForecast(day))
+- except:
+- pass
++ except (IOError, socket.error), e:
++ print "Error retrieving weather data", e
++ self.show_error(("Error retrieving weather data", e))
+
+ return forecast
+
+@@ -186,8 +188,9 @@
+ dcstop = data.find('</hour>',dcstart) ####hourly forecast
+ hour = data[dcstart:dcstop]
+ hforecast.append(self.tokenizeForecastHourly(hour))
+- except IOError, e:
++ except (IOError, socket.error), e:
+ print "Error retrieving weather data", e
++ self.show_error(("Error retrieving weather data", e))
+
+ return hforecast
+
+@@ -513,7 +516,7 @@
+
+
+ if y >= 75 and x <= 132 and x >= 110:
+- os.system('xdg-open weather.com')
++ os.system('xdg-open http://weather.com')
+
+ def on_draw_shape(self,ctx):
+ if self.theme:
+@@ -553,13 +556,15 @@
+
+
+
+- def show_error(self):
++ def show_error(self, reason=None):
+
+ dialog = gtk.Dialog("Zip Code", self.window)
+ dialog.resize(300, 100)
+ dialog.add_buttons(gtk.STOCK_OK, gtk.RESPONSE_OK)
+
+- label = gtk.Label("Could not reach weather.com. Check your internet connection and location and try again.")
++ reasonstr = "\nReason: %s"%str(reason) if reason is not None else ""
++
++ label = gtk.Label("Could not reach weather.com. Check your internet connection and location and try again."+reasonstr)
+ dialog.vbox.add(label)
+ check = gtk.CheckButton("Do not show this again")
+ dialog.vbox.add(check)
Added: packages/screenlets/trunk/debian/patches/17-nowplaying-amarok.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/17-nowplaying-amarok.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/17-nowplaying-amarok.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,25 @@
+#Upstream : https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/269256
+
+Index: trunk/src/share/screenlets/NowPlaying/NowPlayingScreenlet.py
+===================================================================
+--- trunk.orig/src/share/screenlets/NowPlaying/NowPlayingScreenlet.py 2009-04-29 23:20:25.000000000 +0200
++++ trunk/src/share/screenlets/NowPlaying/NowPlayingScreenlet.py 2009-04-29 23:21:47.000000000 +0200
+@@ -58,7 +58,8 @@
+ PLAYER_LIST = {'Rhythmbox':'RhythmboxAPI',
+ 'Listen':'ListenAPI',
+ 'Banshee':'BansheeAPI',
+- 'Amarok':'AmarokAPI',
++#TODO Port to Amarok 2.X API
++# 'Amarok':'AmarokAPI',
+ 'Exaile':'ExaileAPI',
+ 'Sonata':'SonataAPI',
+ 'Kaffeine':'KaffeineAPI',
+@@ -68,7 +69,7 @@
+ 'LastFMProxy':'LastFMProxyAPI',
+ 'Songbird':'SongbirdAPI',}
+
+-PLAYER_LIST_LAUNCH = ['amarok','audacious','banshee','exaile','juk','kaffeine','listen','quodlibet','rhythmbox','sonata','songbird']
++PLAYER_LIST_LAUNCH = ['audacious','banshee','exaile','juk','kaffeine','listen','quodlibet','rhythmbox','sonata','songbird']
+ # The Screenlet
+ class NowPlayingScreenlet(screenlets.Screenlet):
+ """Shows Song Info"""
Added: packages/screenlets/trunk/debian/patches/18-nowplaying-rb-playing.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/18-nowplaying-rb-playing.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/18-nowplaying-rb-playing.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,21 @@
+#Upstream : https://bugs.edge.launchpad.net/screenlets/+bug/369565
+
+Index: trunk/src/lib/plugins/Rhythmbox.py
+===================================================================
+--- trunk.orig/src/lib/plugins/Rhythmbox.py 2009-04-29 23:58:39.000000000 +0200
++++ trunk/src/lib/plugins/Rhythmbox.py 2009-04-29 23:58:45.000000000 +0200
+@@ -74,8 +74,12 @@
+
+
+ def is_playing(self):
+- if self.playerAPI.getPlaying() == 1: return True
+- else: return False
++ try:
++ test_playing = self.playerAPI.getPlaying()
++ if self.playerAPI.getPlaying() == 1: return True
++ else: return False
++ except DBusException:
++ return False
+
+ def play_pause(self):
+ if self.is_playing:
Added: packages/screenlets/trunk/debian/patches/19-remove-autostart-output.patch
===================================================================
--- packages/screenlets/trunk/debian/patches/19-remove-autostart-output.patch (rev 0)
+++ packages/screenlets/trunk/debian/patches/19-remove-autostart-output.patch 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1,15 @@
+#Upstream: https://bugs.launchpad.net/ubuntu/+source/screenlets/+bug/318248
+
+Index: trunk/src/share/screenlets-manager/screenlets-manager.py
+===================================================================
+--- trunk.orig/src/share/screenlets-manager/screenlets-manager.py 2009-04-30 12:10:30.000000000 +0200
++++ trunk/src/share/screenlets-manager/screenlets-manager.py 2009-04-30 12:10:57.000000000 +0200
+@@ -863,7 +863,7 @@
+ elif os.path.exists('%s/icon.png' % path):
+ code.append('Icon=%s/icon.png' % path)
+ code.append('Type=Application')
+- code.append('Exec= python -u %s/%sScreenlet.py' % (path, name))
++ code.append('Exec= python -u %s/%sScreenlet.py > /dev/null' % (path, name))
+ code.append('X-GNOME-Autostart-enabled=true')
+ #print code
+ f = open(starter, 'w')
Modified: packages/screenlets/trunk/debian/patches/series
===================================================================
--- packages/screenlets/trunk/debian/patches/series 2009-05-01 18:49:39 UTC (rev 2833)
+++ packages/screenlets/trunk/debian/patches/series 2009-05-01 23:27:16 UTC (rev 2834)
@@ -8,3 +8,9 @@
11-xfce-wallpaper-setting.patch
12-new-class-creation.patch
13-opacity-option.patch
+14-configuration-save.patch
+15-nowplaying-mpd-try.patch
+16-clearweather-catch-connection-error.patch
+17-nowplaying-amarok.patch
+18-nowplaying-rb-playing.patch
+19-remove-autostart-output.patch
Added: packages/screenlets/trunk/debian/pyversions
===================================================================
--- packages/screenlets/trunk/debian/pyversions (rev 0)
+++ packages/screenlets/trunk/debian/pyversions 2009-05-01 23:27:16 UTC (rev 2834)
@@ -0,0 +1 @@
+2.4-
More information about the Python-apps-commits
mailing list