Symlinks not resolved in get_main_dir(), preferences.plist not found when symlinked.#15
Symlinks not resolved in get_main_dir(), preferences.plist not found when symlinked.#15
Conversation
When determining the directory of the executables, symlinks will now be resolved into a full path before returning. Useful for when you don't want a preferences.plist file in /usr/bin/, and instead want to symlink the exec's to another location such as /usr/local/reposado/code.
…installs Get the preferences.plist file path will check first at a location with no resolved symlinks, and on an error, will resolve the symlinks and check again. This should allow a preferences.plist file to be at either location, with the unresolved path taking precedence.
|
I won't merge this as-is because it could break existing installs. If you changed the logic to something like: def prefsFilePath(): So it would still default to the same location as before, but use the directory of the target of the symlink if it existed, I'd feel better about accepting this. Or bring it up for discussion on the reposado list. |
|
Greg, that's almost exactly what 1d5d27a addresses, albeit in a different way. I didn't mean to include the 1e8a4aa commit. You'd still need a join on the second paths object, |
|
@joraff Is this something you'd be willing to clean up the code to address Greg's concerns and also allow for it to be merged without conflicts? I'm interested in having this issue fixed as I currently have |
Hi Greg,
When someone installs reposado to, say, /usr/local/reposado then symlinks
repo_syncandrepoutilfrom /usr/bin, reposadocommon.py'sget_main_dir()doesn't resolve that symlink and looks for preferences.plist in /usr/bin.I would rather keep everything together and have my preferences.plist file in /usr/local/reposado/code, and only have the two symlinks in /usr/bin.
Easy fix, but it will likely break the configuration for existing reposado installs. I added some ugly logic that will give a preferences.plist file at the unresolved location precedence over one at the resolved path.