Difference between revisions of "Solution to App Catalog Installation Limit"

From WebOS Internals
Jump to: navigation, search
Line 10: Line 10:
 
- create a script to move apps to new home and create link
 
- create a script to move apps to new home and create link
  
vi /usr/bin/mvapp
+
<code>vi /usr/bin/mvapp</code>
 
----
 
----
<nowiki>
+
 
<math>
+
<pre>
 
APP=$1
 
APP=$1
 
DEST=/media/internal/.apps
 
DEST=/media/internal/.apps
Line 66: Line 66:
 
echo "Size of $ORG after move... "
 
echo "Size of $ORG after move... "
 
du -sh .
 
du -sh .
</math>
+
</pre>
</nowiki>
+
 
 
----
 
----
  
  
  
chmod 777 /usr/bin/mvapp
+
<code>chmod 777 /usr/bin/mvapp</code>
  
 
To use, find the largest apps in /var/usr/palm/applications...
 
To use, find the largest apps in /var/usr/palm/applications...
du -s /var/usr/palm/applications |sort -n
+
<code>du -s /var/usr/palm/applications |sort -n</code>
 
 
It shows the largest apps last... IE....
 
 
 
6720 com.accuweather.palm
 
6720 net.likeme
 
6816 com.goodrec.app.goodfood
 
7232 com.apps.forwebos.ahs
 
7456 com.citysearch.mobile
 
8352 com.apnews.webos
 
8512 com.fandango.app.fandango
 
8672 com.palm.app.musicplayerremix
 
10304 com.shortcovers.palm.pre
 
10432 com.fusioncreativestudios.deadman
 
10656 com.ulocate.app.where
 
  
 +
It shows the largest apps last... IE....<br>
 +
<code>
 +
6720 com.accuweather.palm<br>
 +
6720 net.likeme<br>
 +
6816 com.goodrec.app.goodfood<br>
 +
7232 com.apps.forwebos.ahs<br>
 +
7456 com.citysearch.mobile<br>
 +
8352 com.apnews.webos<br>
 +
8512 com.fandango.app.fandango<br>
 +
8672 com.palm.app.musicplayerremix<br>
 +
10304 com.shortcovers.palm.pre<br>
 +
10432 com.fusioncreativestudios.deadman<br>
 +
10656 com.ulocate.app.where<br>
 +
</code>
 
To move com.ulocate.app.where, use the script...
 
To move com.ulocate.app.where, use the script...
  
mvapp com.ulocate.app.where
+
<code>mvapp com.ulocate.app.where</code>
  
 
It should now work in the new location thanks to the link. Test each app to make sure it works before doing another. I don't recommend looping the script to do every app in the dir or to link the entire app dir. File attributes are lost on the move, which some apps may need. You need to test each app after a move.
 
It should now work in the new location thanks to the link. Test each app to make sure it works before doing another. I don't recommend looping the script to do every app in the dir or to link the entire app dir. File attributes are lost on the move, which some apps may need. You need to test each app after a move.

Revision as of 22:59, 29 September 2009

Based on rwhitby's findings that temporarily moving /var/usr/palm/applications will allow installing apps from the App Catalog, here's a permanent way to keep the apps on (much larger) /media/internal by using links. This will permanently save space on /var.

It's unfortunate that Palm has not resolved the issue in the 1.2 update. This is a workaround that could work long term, also saving space on /var, but this needs support by the homebrew community to add in the homebrew installer apps.

Solution

- create a dir mkdir /media/internal/apps

- create a script to move apps to new home and create link

vi /usr/bin/mvapp


APP=$1
DEST=/media/internal/.apps
ORG=/var/usr/palm/applications

if [ -d $DEST ]
then
echo ""
else
mkdir $DEST
fi

if [ -h $APP ]
then
echo "Link already exists for... ${APP}"
exit
fi

if [ -d $APP ]
then
echo "Moving $APP to $DEST..."
else
echo "Not a valid application directory."
echo "Usage: mvapp com.org.appname "
exit
fi

mount -o remount,rw /

cd $ORG
echo "Size of /var/usr/palm/applications before move... "
du -sh .

# move over to USB drive
cp -r $ORG/$1 $DEST
if [ $? != 0 ]
then
echo "Copy failed. Leaving app in $ORG."
exit
fi

rm -r $ORG/$1

# create the link
ln -s $DEST/$1 $ORG/$1


# rescan luna in case it's needed
luna-send -n 1 palm://com.palm.applicationManager/rescan {}

echo "$1 moved and linked."
echo "Size of $ORG after move... "
du -sh .


chmod 777 /usr/bin/mvapp

To use, find the largest apps in /var/usr/palm/applications... du -s /var/usr/palm/applications |sort -n

It shows the largest apps last... IE....
6720 com.accuweather.palm
6720 net.likeme
6816 com.goodrec.app.goodfood
7232 com.apps.forwebos.ahs
7456 com.citysearch.mobile
8352 com.apnews.webos
8512 com.fandango.app.fandango
8672 com.palm.app.musicplayerremix
10304 com.shortcovers.palm.pre
10432 com.fusioncreativestudios.deadman
10656 com.ulocate.app.where
To move com.ulocate.app.where, use the script...

mvapp com.ulocate.app.where

It should now work in the new location thanks to the link. Test each app to make sure it works before doing another. I don't recommend looping the script to do every app in the dir or to link the entire app dir. File attributes are lost on the move, which some apps may need. You need to test each app after a move.

If you have issues with an app, remove it and reinstall through the respective app catalog or homebrew installer app.

Proposal

Would like to propose that PreWare, WebOS Quick Install and other Pre installer apps provide an option to move any app in /var to the /media fs and create a link per the code above. Also provide option to move back. Could make a backup retaining file attributes using tar and restore that way.


Risks, Issues, Dependencies

- File attributes of linux fs are not copied over to fat fs. May not work with apps that rely on file attributes.