aboutsummaryrefslogtreecommitdiff
path: root/multimedia/tunapie/files
diff options
context:
space:
mode:
authorNicola Vitale <nivit@FreeBSD.org>2007-04-17 13:47:40 +0000
committerNicola Vitale <nivit@FreeBSD.org>2007-04-17 13:47:40 +0000
commitd0623ef4c04fd1607ff1b81f366b9fa9ed2d7535 (patch)
tree67a82d1e1c54d7f8096a9fbe54ff6d7a57610a3d /multimedia/tunapie/files
parent5228f583a0bc0dfa58ef58722b90c0eebdb57159 (diff)
downloadports-d0623ef4c04fd1607ff1b81f366b9fa9ed2d7535.tar.gz
ports-d0623ef4c04fd1607ff1b81f366b9fa9ed2d7535.zip
Notes
Diffstat (limited to 'multimedia/tunapie/files')
-rw-r--r--multimedia/tunapie/files/patch-src-tuner.py46
1 files changed, 43 insertions, 3 deletions
diff --git a/multimedia/tunapie/files/patch-src-tuner.py b/multimedia/tunapie/files/patch-src-tuner.py
index 422e02b9b76f..88e2ccd12b24 100644
--- a/multimedia/tunapie/files/patch-src-tuner.py
+++ b/multimedia/tunapie/files/patch-src-tuner.py
@@ -1,6 +1,46 @@
---- src/tuner.py Mon Apr 9 00:35:15 2007
-+++ src/tuner.py.port Mon Apr 9 16:33:50 2007
-@@ -290,7 +290,7 @@
+--- src/tuner.py Wed Apr 11 00:20:17 2007
++++ src/tuner.py.port Tue Apr 17 14:57:55 2007
+@@ -14,7 +14,7 @@
+ #along with this program; if not, write to the Free Software
+ #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ #
+-#Version 0.3.19 08/04/07
++#Version 0.3.20 11/04/07
+
+ import urllib
+ import popen2
+@@ -29,9 +29,12 @@
+ import time
+
+ def pkill(program):
++ flag=""
+ rip = program
+ me = commands.getoutput("whoami")
+- p = commands.getoutput("ps -u %s -o comm -o pid" % me)
++ if sys.platform.find("linux")==-1:
++ flag="-"
++ p = commands.getoutput("ps "+flag+"U "+me+" "+flag+"o pid "+flag+"o command")
+ ids = p.split("\n")
+ found=0
+ firstrun=1
+@@ -44,10 +47,13 @@
+ else:
+ found=1
+ firstrun=0
+- regex = re.compile(r'(\d+).*',re.I)
+- id = regex.sub(r'\1', id)
++ id=id.split(" ")
++ try:
++ id=str(int(id[0]))
++ except:
++ id=str(int(id[1]))
+ commands.getoutput("kill -15 %s" % id)
+- if commands.getoutput("ps -u %s -o fname -o pid" % me).find(id) > -1:
++ if commands.getoutput("ps "+flag+"U "+me+" "+flag+"o pid "+flag+"o command").find(id) > -1:
+ commands.getoutput("kill -9 %s" % id)
+ return found
+
+@@ -290,7 +296,7 @@
popen2.Popen4(browser+' '+url)
def adultset():