Ticket #445 (closed enhancement: fixed)

Opened 8 months ago

Last modified 7 months ago

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

symlinkPatch.txt (1.1 kB) - added by eolson 8 months ago.
Patch to check for symlinked files in install prefix.

Change History

Changed 8 months ago by eolson

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).

Changed 8 months ago by eolson

Patch to check for symlinked files in install prefix.

Changed 8 months 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).

Changed 8 months ago by dos

  • keywords HasPatch added

Changed 7 months ago by mickey

  • status changed from new to closed
  • resolution set to fixed

commited as b8f65c09c2aa3921357cf148cf5c0990cbf95a2c, thanks a lot!

Note: See TracTickets for help on using tickets.