[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819
Michael 'Mickey' Lauer
mickey at vanille-media.de
Sat Aug 6 08:18:05 UTC 2011
The following commit has been merged in the debian branch:
commit b8f65c09c2aa3921357cf148cf5c0990cbf95a2c
Author: Eric Olson <eolson at cronbread.org>
Date: Tue Aug 25 23:03:54 2009 +0200
config: improve finding installpath when symlinked (ipkg-link etc.) to other locations
diff --git a/framework/config.py b/framework/config.py
index c224169..d297da1 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -107,6 +107,27 @@ for p in searchpath:
installprefix = p
break
+if installprefix == "/":
+ # Installation not found yet, check for symlinked install.
+ # e.g. Check if a /usr/... install is a symbolic link to /media/card/...
+
+ separatedFilePath = __file__.split( os.sep )
+ for i in range( 2, len( separatedFilePath ) ):
+ sepShortFilePath = [ "" ] + separatedFilePath[i:]
+ shortFilePath = os.sep.join( sepShortFilePath )
+ #logging.debug( "Installprefix check comparing %s, %s" % (shortFilePath, __file__) )
+
+ # Symbolic link check
+ if os.path.islink( shortFilePath ) and os.path.samefile( shortFilePath, __file__ ):
+ for p in searchpath: # verify it's an install in the searchpath
+ if shortFilePath.startswith(p):
+ installprefix = p
+ break
+
+ # Stop checking if we've found and set the installprefix.
+ if installprefix != "/":
+ break
+
logging.info( "Installprefix is %s" % installprefix )
#
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list