maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   packaged files read only? (https://talk.maemo.org/showthread.php?t=45166)

jamiefuller 2010-02-19 22:53

[solved]packaged files read only?
 
Hi All,

Hit a little snag with my latest game.

Its ready to go but its crashing whenever trying to write data to any of the packaged files.

for example the deb file puts a binary file in /opt/gamename folder which contains the number of the highest level unlocked .

I can read the file no problem but when I try to write to it it crashes my game. I presume its an access problem because if I manually chmod the file to a+rw the game no longer crashes.

Code:

        cp game.bin $(DESTDIR)/opt/gamename
        chmod a+rw $(DESTDIR)/opt/gamename/game.bin

So I have tried adding the commands into the install section of my make file but it doesn't work. and if I check the permissions of the installed files they are still read only any ideas?

Cheers
Jamie

---
Solved,
If anyone else has this problem its because of the dh_fixperms function in the rules file, it reset all the permisions to a "sane" setting.

If you want to specifically set a permission use chmod and then exclude the file from dh_fixperm

Code:

dh_fixperms -Xitem -exclude file-you-chmodded

mikkov 2010-02-23 18:49

Re: packaged files read only?
 
Usually this type of information is stored in user's home directory. For example in file called ~/.myapp. This file is not included in the package but it's generated by the application when needed.


All times are GMT. The time now is 14:34.

vBulletin® Version 3.8.8