Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. Ok, in looking at this package, i have really several issues that I think we need to fix:
  2.  
  3. 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.
  4. 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).
  5. 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?
  6. 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.
  7.  
  8. 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.
  9.  
  10. Postinst
  11. #!/bin/sh
  12. if [ -f /tmp/com.nakedproductions.applocket.start.plist ]; then
  13. echo "Finishing Updgrade"
  14. cp /tmp/com.nakedproductions.applocket.start.plist /var/mobile/Library/Preferences/
  15. rm /tmp/com.nakedproductions.applocket.start.plist
  16. rm /tmp/com.nakedproductions.applocket.plist
  17. else
  18. echo "Finishing First Install"
  19. cp /tmp/com.nakedproductions.applocket.plist /var/mobile/Library/Preferences
  20. rm /tmp/com.nakedproductions.applocket.plist
  21. fi
  22. exit 0
  23.  
  24.  
  25. Preinst:
  26. #!/bin/sh
  27. if [ -f /var/mobile/Library/Preferences/com.nakedproductions.applocket.start.plist ]; then
  28. echo "Updgrading"
  29. cp /var/mobile/Library/Preferences/com.nakedproductions.applocket.start.plist /tmp/
  30. else
  31. echo "First Install"
  32. fi
  33.  
  34. declare -a cydia
  35. cydia=($CYDIA)
  36.  
  37. if [[ ${CYDIA+@} ]]; then
  38. eval "echo 'finish:restart' >&${cydia[0]}"
  39. fi
  40.  
  41.  
  42. exit 0
  43.  
  44. I think we dont need that finish: restart stuff as we Depends: mobilesubstrate.
  45.  
  46.  
  47. I would like to discuss the above things so that this package doesnt cause us any support issues.
  48.  
  49. BigBoss
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement