Open dimatomp opened 11 years ago
Well, that's why optware-android is intended for Android devices, Android being AOSP with sources at https://android.googlesource.com/ . And AOSP does not install or use anything in /lib or in other classical "Unix" dirs - which I hope you agree was pretty smart on Google's side. CyanogenMod breaks that Android invariant, and thus is not compatible with Optware in particular.
You're right that it might be possible to work that around somehow, but I'd need to have a device with it to investigate and debug it. I don't have such (I generally avoid CyanogenMod due to reasons which are clear from this discussion - they install something on my system which I don't need, and break compatibility with the stuff I want to install). So, if you can prepare a clean patch to fix this (without affecting standard Android devices), I'd be glad to merge it, but otherwise this would be just a "known issue".
Some rooted firmwares (e.g. CyanogenMod 10.1 on my Galaxy S Plus GT-I9001) create their own /lib folder after every boot. As a result, when the installation script tries to create a symlink to $OPTWARE_DIR/rootlib (line 253), it gets a "link failed File exists" error. It installs everything it needs into the existing /lib, but all this data gets removed when the device is rebooted, making Optware unable to work properly (/bin/sh says "No such file or directory" when asked to run ipkg or anything installed by it, although PATH contains /opt/bin).
As far as I understand, this can be solved by checking whether /lib folder already exists and doing something with it (removing, creating symlinks in it, etc.)