View Single Post
05-17-09, 04:53 AM   #11
lilsparky
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 117
Originally Posted by Shirik View Post
Minion modules request write permissions to a particular directory and all subdirectories. While it would theoretically be possible for a module to pick out which directories it wants, it is NOT possible for a module to say that other modules are not allowed to write there.
right, it would be minion saying no to a module A trying to write to an addon directory that module B has been given permission to write to. module A doesn't know anything about module B, it just knows it isn't allowed to write there for whatever reason.

this would present a problem, tho, where module A might keep annoying the user about being unable to write (or askig if it's okay) instead of silently failing. it would be up to the module authors to implement their updating system to be silent about such things, tho.

if the user prefers that module A should take over the addon, then they'd do an install rather than an update using module A. module A would then ask if it's okay (because of the write permissions) and module B's write permissions would evaporate for that addon if they user agrees.

in this scheme, no module knows anything about any other module and the only thing minion is concerned about is which module has write access to which directories.

Similarly, it wouldn't be recommended to pick out addon folders individually for write access -- this would be very annoying to the end user as it has a high probability of changing. The WoWI module simply requests access to the WoW folder and all subdirectories, which will never change (except in the event of WoW moving)
i thought part of the theory with the permissions stuff was to avoid the possibility that somebody writes a module that does funny business -- like installing stuff you didn't ask for or accessing files in directories you don't want it mucking with. that would take finer control than just the wow folder, no?

when a new module is installed, you'd have to give it read access to the addons folder so it can figure out what you've got installed. when you hit update all, it would figure out which mods it *thinks* need to be updated. when you click update, it would iterate over those addons and attempt to write and would be rebuffed. if another module has write permissions for that directory, it would silently fail, if no other module has write permissions, minion would ask if it's okay for that module to write to that directory.

the first time running minion, you'd end up with a bunch of requests to grant write access which could be annoying, i suppose. a solution would be grant temporary write access to the parent directory of whatever the current query is. so that all other writes to the same directory would go thru without question, but any write that was outside that directory would still pop a request.

anyway, i'm sure you guys have figured out something that works.
  Reply With Quote