Add hack to determine svn revision on Gentoo with svn ebuild.

This commit is contained in:
Andrew Resch 2008-01-22 05:20:20 +00:00
parent b64393d096
commit 93e631d893
1 changed files with 17 additions and 2 deletions

View File

@ -52,11 +52,19 @@ try:
if line.split(" ")[0] == "Revision:":
revision_string = line.split(" ")[1].strip()
break
# Try to get the SVN revision on Gentoo systems
if revision_string == "":
stdout = os.popen("svn info /usr/portage/distfiles/svn-src/deluge/deluge-0.6")
for line in stdout:
if line.split(" ")[0] == "Revision:":
revision_string = line.split(" ")[1].strip()
break
f = open("deluge/data/revision", "w")
f.write(revision_string)
f.close()
except Exception, e:
print "Unable to get or write revision: ", e
except:
pass
# The libtorrent extension
@ -241,3 +249,10 @@ setup(
deluge = deluge.main:start_ui
deluged = deluge.main:start_daemon
""")
try:
f = open("deluge/data/revision", "w")
f.write("")
f.close()
except:
pass