maemo.org Bugzilla – Bug 2312
AM does not support installing from a file in 4.0 SDK
Last modified: 2008-04-23 16:21:30 UTC
You need to log in before you can comment on or make changes to this bug.
EXPECTED OUTCOME: That "install from file" does something. ACTUAL OUTCOME: No perceivable effect at all. Debs are not installed, no errors are printed out. STEPS TO REPRODUCE THE PROBLEM: In 4.0 SDK, start application manager, from the menu, select Tools -> install from file, select a deb file to install, press 'select'. Observe nothingness. Debs installed from the command like work (dpkg -i). OTHER COMMENTS: Oh, do NOT try to reinstall hello-world-app. In the process, maemo-sdk-dev will be removed, and reinstalling that deb will cause a duplicate application-menu to appear in the TN and kill all .so based hello-world apps. Permanently (SDK reinstall required).
The correct steps to repeating was actually menu -> Application -> Install from file... (NOTE, the below steps were _only_ tested on the X86 side of chinook) However, meanwhile, a workaround the problem is possible as follows (yes, I know it's a horrible kludge, but at least it allows me to continue with my work): 1) AM tries to start /usr/bin/fakeroot (from AM log). This fails in the SDK because there is no fakeroot there. Fix with: cd /usr/bin ln -s /scratchbox/tools/bin/fakeroot This allows AM to proceed to at least one step forward (to start the apt-helper component) However, this will lead to problems with dpkg when AM will actually decide to install the selected package. It doesn't run it with fakeroot. So, in order to complete the horrible kludge: 1) cd /usr/bin 2) mv dpkg dpkg.orig 3) cat > dpkg #!/bin/sh fakeroot /scratchbox/devkits/debian-etch/bin/dpkg "$@" <<Ctrl+D>> 4) chmod +x dpkg And presto, application manager can now manage applications (installing from files works, as does all application removal stuff).
More information (just to other people who might want to run AM): application manager will break on the ARMEL side in 4.0 SDK, so don't even think using it (it's the infamous qemu-problem). There is a possible fix to that on the maemo-devel lists. Otherwise the exact same steps need to be repeated as were done for the X86 side.
This is used to work just fine in older versions of the SDK and also works fine in Sardine by installing fakeroot-net. Using fakeroot instead of sudo is enough of a concession. I don't want to put in further hacks to support the twisted world view of Scratchbox. The SDK should provide a working fakeroot in /usr/bin/fakeroot. Installing "fakeroot-net" used to take care of that. I'll reassign to the SDK. (Also, a missing or non-working fakeroot means that the AM won't do anything at all. Not being able to install .debs from the menu is only one of the many things that wont work.)
AM does not depend on fakeroot-net, and thus fakeroot-net does not get pulled in to SDK. fakeroot-net is not available in the internal repository.
(In reply to comment #4) > AM does not depend on fakeroot-net, and thus fakeroot-net does not get pulled > in to SDK. fakeroot-net is not available in the internal repository. The dependencies of the AM are made for the device, not the SDK. (The AM uses sudo in the real world, not fakeroot, of course). I could use a dependency like "Depends: fakeroot [i386]" to pull in fakeroot only on i386, but that is wrong since it is just a coincidence that fakeroot is needed on the i386 architecture but not on armel. We can add fakeroot-net to the dependencies of the hildon-application-framework-dev meta package, tho. A nice solution might be to make sudo work in Scratchbox. Or to fix fakeroot so that "sb-conf --copy fakeroot" or the symlink in the original bug description is enough.
(In reply to comment #5) > I could use a dependency like "Depends: fakeroot [i386]" to pull in fakeroot > only on i386, but that is wrong since it is just a coincidence that fakeroot is > needed on the i386 architecture but not on armel. I guess that would be a problem for anybody who wants to install AM in f.ex. their PC. So, this would not be a solution. Enabling sudo in Scratchbox on the other hand sounds like a security hole that at least I wouldn't like to have in my laptop. > We can add fakeroot-net to the dependencies of the > hildon-application-framework-dev meta package, tho. This would get at least Diablo SDK fixed. The problem is that fakeroot-net is not available in the internal repository. It only exists in Sardine and Bora.
sudo in the SDK could be a light-weight wrapper for fakeroot. Just fake some of the cmd line parameter support that most people use with sudo, and internally call fakeroot. That way programs that use sudo on the device, would continue working in the SDK and since real sudo wouldn't be involved, this shouldn't present any (additional) security issues in the SDK.
As a positive plus, running apt-get install with sudo would feel more natural in the SDK as well (compared to: fakeroot apt-get install). Although I'm not sure whether "hiding" fakeroot in this way would be for the better or for the worse :-).
Installing fakeroot-net indeed does fix this problem.
Fakeroot-net will be included in the Diablo release fixing the problem.