Code review comment for lp:~michihenning/unity-scopes-api/scope-cache-dir

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

> > > Yes, the directory needs to be created as part of the installation.
> > >
> > > Still not solved afaict, without it, this branch is useless.
> >
> > The leaf-net, leaf-fs, or aggregator directories can all be unconditionally
> > created by the scope click hook if they don't already exist. The scope click
> > hook could also consider a new 'Type' field added to ScopeConfig (see below
> > for discussion), but I don't think it needs to (just create all 3 and be
> done
> > with it).
>
> One thing I don't understand here: because the dir is underneath $HOME, that
> means the click hook would have to create the dir for *all* users of the
> device? What if a user is added later, after a scope was installed? In that
> case, whatever script runs to add a user would have to make sure that this
> directory is create along with everything else.
>
> Unless I'm missing something, this seems brittle to me.

That is the job of the click hook system. We don't support multi-user yet, but when we do, click user hooks will have to be run anyway. When the click user hooks are run on adding a new user, you get this for free.

In other words-- running click user hooks (of which the scope is but one) have to be solved for the case you mentioned anyway. Nothing special has to be done for scopes when it is.

« Back to merge proposal