Hi all,
Just a thought, but would there be any practicality to adjusting the part of libpnd that creates the appdata directory if it doesn't exist to also scan the PND and manually recreate its directory structure in the new appdata directory? This may alleviate the issue of having to have the run scripts manually create any necessary subdirectories.
Thoughts?
- Neelix
On Wed, 29 Aug 2012, Neelix wrote:
# Just a thought, but would there be any practicality to adjusting the part of libpnd that creates the appdata directory if it doesn't exist to also scan the PND and manually recreate its directory structure in the new appdata # directory? This may alleviate the issue of having to have the run scripts manually create any necessary subdirectories. # Thoughts?
Thought about that in the distant past, and the idea was shot down mostly because.. you may have some wild-ass directory structure in the PND, but only read it; in general, the changes you intend to make usually aren't really widespread, so why create an enormous directory structure on SD, when chances are you only need to make one or two.
And it didn't seem like there would be any way to predict what would be changed.. ie: can only leave it for the subject matter expert, the author of the pnd.
The way aufs works is pretty annoying there (Self defeating?), but not sure theres a great automatic workaround. (Maybe aufs has had improvements over time, maybe theres new options that make it work better? Someone should check that :P)
jeff
-- If everyone would put barbecue sauce on their food, there would be no war.
Agreed. Beside, a mkdir -p in the launch script of the PND will be way faster than having pnd_run.sh crawl the PND directory structure and create the missing directories on each PND start.
Cheers, sebt3
2012/8/29 skeezix skeezix@skeleton.org
On Wed, 29 Aug 2012, Neelix wrote:
# Just a thought, but would there be any practicality to adjusting the part of libpnd that creates the appdata directory if it doesn't exist to also scan the PND and manually recreate its directory structure in the new appdata # directory? This may alleviate the issue of having to have the run scripts manually create any necessary subdirectories. # Thoughts?
Thought about that in the distant past, and the idea was shot down
mostly because.. you may have some wild-ass directory structure in the PND, but only read it; in general, the changes you intend to make usually aren't really widespread, so why create an enormous directory structure on SD, when chances are you only need to make one or two.
And it didn't seem like there would be any way to predict what
would be changed.. ie: can only leave it for the subject matter expert, the author of the pnd.
The way aufs works is pretty annoying there (Self defeating?), but
not sure theres a great automatic workaround. (Maybe aufs has had improvements over time, maybe theres new options that make it work better? Someone should check that :P)
jeff
-- If everyone would put barbecue sauce on their food, there would be no war. _______________________________________________ Firmware-dev mailing list Firmware-dev@openpandora.org http://openpandora.org/cgi-bin/mailman/listinfo/firmware-dev
On 30/08/12 01:12, Sébastien Huss wrote:
Agreed. Beside, a mkdir -p in the launch script of the PND will be way faster than having pnd_run.sh crawl the PND directory structure and create the missing directories on each PND start.
Well I didn't think it was a good idea to do it every time the PND was started, my thought was to do it only when initially creating the appdata folder, and skipping the process it if it already existed. That being said I do take the point that there may be many directories that do not need to be written to.
- Neelix
I suggest look into using 'cp -r --no-clobber' I use this for all my pnds to copy a set of default data that the user should be able to change or need to be written to. But with the no clobber option it will not copy if the item already exisits.
________________________________ From: Neelix siblingcreature@gmail.com To: Sébastien Huss sebastien.huss@gmail.com Cc: firmware-dev@openpandora.org Sent: Wed, August 29, 2012 12:16:44 PM Subject: Re: [Firmware-dev] aufs - directories not created in overlay
On 30/08/12 01:12, Sébastien Huss wrote:
Agreed. Beside, a mkdir -p in the launch script of the PND will be way faster than having pnd_run.sh crawl the PND directory structure and create the missing directories on each PND start.
Well I didn't think it was a good idea to do it every time the PND was started, my thought was to do it only when initially creating the appdata folder, and skipping the process it if it already existed. That being said I do take the point that there may be many directories that do not need to be written to.
- Neelix _______________________________________________ Firmware-dev mailing list Firmware-dev@openpandora.org http://openpandora.org/cgi-bin/mailman/listinfo/firmware-dev
On Wed, 29 Aug 2012, Scott Smith wrote:
# I suggest look into using 'cp -r --no-clobber' # I use this for all my pnds to copy a set of default data that the user should be able to change or need to be written to. But with the no clobber option it will not copy if the item already exisits.
yeah, I do the same, and suggest to people as a 'best practice'; ie: in a pnd, there shoud be a 'defaults/' dir with a bunch of stuff in it, and then in your first run (you can check if the files exist,a nd if not, first run) do a cp to copy the defaults in. Works a treat.
Sadly, its just another bit of 'magic' that new-to-pandora developers have to figure out that you'd never do on a regular desktop, but not sure theres a better workaround :/
jeff
-- If everyone would put barbecue sauce on their food, there would be no war.