No Appdata Dir In Pxml


Pleng

Well-Known Member
Joined
Dec 28, 2006
Messages
3,030
I have PND'd up a lot of scripts and unfortunately they all insist in creating a directory in appdata even though they have nothing to put there! I suppose I could at least set them all to have the SAME appdata, but is there some way in PXML to declare that an app doesn't NEED a data directory?
 
Pleng said:
I have PND'd up a lot of scripts and unfortunately they all insist in creating a directory in appdata even though they have nothing to put there! I suppose I could at least set them all to have the SAME appdata, but is there some way in PXML to declare that an app doesn't NEED a data directory?

<application id="uniqueID" appdata="dirname">

where you change the dirname to the common appdata folder you want to use
 
Last edited by a moderator:
Just use a common one .. Maybe we should define a common empty one for this. An appdata dir is needed for the pnd mount process, but should be deleted after if empty (though sometimes files are 'left open' so it can't be removed). Note that if they all share same appdata it implies they should not run at same time

Jeffphone
 
skeezix said:
it implies they should not run at same time
Or it at least implies that they should be cooperative with one another, e.g. as long as it isn't an app that clears its appdata folder every time it quits, you should be OK.
 
Last edited by a moderator:
they're just bash scripts that alter the CPU speed and launch gnome-mplayer etc...

yea i'm aware I can do <application id="uniqueID" appdata="dirname"> which will at least make them all use the same directory, but it might be worth including support for appdata=none in the next update.
 
skeezix said:
Not the next update, but down the road we have some plans vaguely along this lines

Jeff
Skeezix, as you know I have my own fork of libpnd.
This fork has some great improvements over the current 'official' libpnd branch, and it is completely binary compatible with your branch, *but* it basically deprecates the current libpnd pnd_pxml.h API. However; among other things, it contains graceful fall backs for many different situations, such as when there's no appdata attribute etc.

I'll publish this branch when it's ready, as required by the GPL, and you might be interested in merging it back into libpnd then. (It's finally post-shipment times now, so now we can 'go crazy' as you put it ;) )

EDIT: should probably work on this right now btw, M-x c-mode here I come.
 
Last edited by a moderator:
Fwiw existing libpnd falls back gracefully just fine in that regard, using uniqueid. We require appdata (or uniqueid) for appdata-dir for the aufs. We'd like to add a fastmount option which skips the aufs part (no writebacks implied) as it mounts near instantly (as opposed to a couple second for aufs). Good for pulling preview pics etc or for not needing appdata bs.

I've not looked at your tree (busy enough on my own code :), but last I looked many months ago there were some conflicts, redundancies due to parallel coding, etc. And since you reformatted it all (tsk!) it blows up merging gracefully :( but those are old memories so could be all wrong

Certainly sounds like modules or blurbs could be brought over but by bit. I really intended a lot of libpnd to be replaced though, so whatever :)

We need a new dbus client part fast though hint hint :)

Sorry, on my phone as always for anohe 2 weeks so hope this came out right :)

Jeffphone
 
Well my tree is another fork entirely :) so don't worry about that; my *real* changes aren't public yet because the code is ugly.

Yeah the libpnd code needs a rewrite, but I've only touched the pnd_pxml.h parts and rewritten the API completely (as I said, the current master libpnd API is completely deprecated) and what I mean when I say that I handle appdata directories, is that there's a "const char *pnd_application_get_appdata_dir(const pnd_application app);" that automatically handles dir creation and picks a name by choosing between a number of different attributes etc. I might even make it handle the directory creation. The point of my fork is that I want to pull common stuff into libpnd; people shouldn't have to do basic things like calling strtol on version attributes and so on; libpnd should do that for you (and provide a comparison function for versions, and do basic validity checking, and, and... long TODO list).

EDIT: DBUS sounds good; I think that pndnotifyd could be implemented completely as a DBUS service...
 
Yeah ive octen thought it to - he k, just a py script invokedat mount.sh would due :) (we didnt have dbus in, back when. Doh :)

Jeffphone
 
Back
Top