Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ok, in looking at this package, i have really several issues that I think we need to fix:
- 1) /tmp folder is cleaned on every OS boot. You cannot have install copy files there. I am not sure what happens when files handled by apt are deleted by external means. I wouldn't think it would be good.
- 2) The folder /var/mobile/Library/Preferences is backed up by iTunes. Is this really what you want? This means that there is potential for iTunes to resync old versions of the plists. Worse yet, you may have an iPhone locked with passcode, restore, run app backup to reinstall apps, and it will be locked again from the user's perspective. This worries me and I think it should worry you for support issues. (Unless this is desired behavior).
- 3) In my opinion we should not be installing any files from cydia into /var/mobile/Library/Preferences folder. These should be created by the app at runtime, owned by user mobile, and such. Lets say you dont detect a com.nakedproductions.applocket.start.plist, cant your app create this using stock defaults rather than have us copy a version into the folder with root ownership?
- 4) The app, itself, (or preference loader component) is the only thing that should be writing your plist. If we do not distribute the plist in the install package, we no longer need any of this cp stuff going on in upgrades or probably any of the postinst, preinst scripts. User settings would be automatically, magically, preserved on an upgrade because cydia isnt managing these files.
- 5) I am also worried about the postinst and preinst scripts, themselves. First, they will be run several times in the install process on an upgrade. Second, they will result in the files being owned by root.
- Postinst
- #!/bin/sh
- if [ -f /tmp/com.nakedproductions.applocket.start.plist ]; then
- echo "Finishing Updgrade"
- cp /tmp/com.nakedproductions.applocket.start.plist /var/mobile/Library/Preferences/
- rm /tmp/com.nakedproductions.applocket.start.plist
- rm /tmp/com.nakedproductions.applocket.plist
- else
- echo "Finishing First Install"
- cp /tmp/com.nakedproductions.applocket.plist /var/mobile/Library/Preferences
- rm /tmp/com.nakedproductions.applocket.plist
- fi
- exit 0
- Preinst:
- #!/bin/sh
- if [ -f /var/mobile/Library/Preferences/com.nakedproductions.applocket.start.plist ]; then
- echo "Updgrading"
- cp /var/mobile/Library/Preferences/com.nakedproductions.applocket.start.plist /tmp/
- else
- echo "First Install"
- fi
- declare -a cydia
- cydia=($CYDIA)
- if [[ ${CYDIA+@} ]]; then
- eval "echo 'finish:restart' >&${cydia[0]}"
- fi
- exit 0
- I think we dont need that finish: restart stuff as we Depends: mobilesubstrate.
- I would like to discuss the above things so that this package doesnt cause us any support issues.
- BigBoss
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement