Playing around with my Pre last night I thought I'd try installing a package by hand by scp'ing the ipk to /tmp and then using Palm's ipkg command to install it. It didn't work (errors up the wazoo).

Having a look around it seems that when you run "palm-install" all it does is extract your app's ipk file to /media/cryptofs/apps/usr/palm/applications/ as "com.whatever.whatever" and then runs "luna-send -n 1 palm://com.palm.applicationManager/rescan {}".

It obviously isn't using the built-in ipkg command (in a standard way anyway) for installation... Otherwise an "ipkg list_installed" would show your installed WebOS apps (as opposed to just the system stuff).

Does anyone have any insight into this? Is palm-install doing something else in the background that I'm not seeing (such as registering apps in a ipk db or file somewhere)?

If it isn't doing anything more than the aforementioned steps one could "install" whatever apps they wanted just by extracting a tarball to the proper location and telling Luna to rescan. Sound about right?

It would explain why typical ipkg control scripts aren't run when you install an app (e.g. preinst, postrm, etc).

Also, related to this: How does the App Catalog install ipks? Does it just work like palm-install? Is there any way to issue a command on the Pre itself to install an ipk without having to make a tarball and whatnot (Note: I'm not talking about ipkg-opt stuff, just straight-up Luna-style installs)? How does it know what apps are installed and how does it determine if updates are available?

(I know, I know... Lots of questions =)