Ticket #445 (closed enhancement: fixed)
Default frameworkd config location
| Reported by: | eolson | Owned by: | mickey |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | framework/general | Version: | |
| Keywords: | HasPatch | Cc: |
Description
Could the default installation location be changed from "/" to "/usr"?
I run into a problem if I install frameworkd to a different opkg location and use ipkg-link (I'm using ipkg-link to put most python packages on the SD card to save space on my GTA01).
In frameworkd/config.py The Installprefix detected is "/" because the python file is in this directory: /media/card/opkg/usr/lib/python2.6/site-packages/framework symlinked to /usr/lib/python2.6/site-packages/framework I can't think of a simple way to fix frameworkd/config.py to detect "/usr".
I'm assuming it wouldn't be a big problem to make "/usr" the default frameworkd installation location since most linux installations use "/usr" and not "/".
I would understand if this suggestion is rejected because it's a bit of a hack just to solve my problem with symlinks. But, if it would be useful in general to make "/usr" the default, that would be great for me or anyone else who wants to use ipkg-link.
Attachments
Change History
Changed 3 years ago by eolson
-
attachment
symlinkPatch.txt
added
Patch to check for symlinked files in install prefix.
comment:2 Changed 3 years ago by eolson
I attached a patch with an alternate possible solution. The additional code to detect the installprefix in the patch may be preferable to changing the default installprefix to "/usr".
If the install prefix is not found by the original code, the patched code next looks for possible symlinked file locations.
Example: the running framework's config.py is loaded from /media/card/opkg/usr/.., The patch changes config.py to check if /card/opkg/usr/.../config.py is a symlink to that file
then tries /opkg/usr/... and /usr/... (It correctly finds the symlink here and uses the install prefix "/usr")
For me, this fixes the problem detecting the framework installprefix when using a GTA01 with the framework installed on the SD card (with the help of ipkg-link).

A recursive check in the searchpaths for symlinks pointing to the file might work. I'll see if I can work up a patch (as soon as I have time to test it on the phone).