← Back to team overview

touch-packages team mailing list archive

[Bug 1245826] Re: Allow applying a hook to multiple files

 

As far as I am concerned, this bug is no longer important. It's very
easy to workaround this limitation by having the hook process a JSON
file containing all the information needed: the list of files can be put
in there.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to click in Ubuntu.
https://bugs.launchpad.net/bugs/1245826

Title:
  Allow applying a hook to multiple files

Status in click package in Ubuntu:
  In Progress

Bug description:
  Currently, a click hook can be applied to a single file. However, in
  some cases it might be needed for a click package to install several
  files in the same directory. For instance, a click package installing
  a new account plugin which provides different services (for instance,
  a website could provide an e-mail service, instant messaging, file
  sharing, etc.) which are represented to libaccounts via XMl files
  installed to /usr/share/accounts/services (or
  ~/.local/share/accounts/services).

  I would suggest providing the hook's "Pattern" field with a variable
  holding the filename of the source file (just the base name, with the
  path stripped out), so that it can be used to differentiate the
  symlinks in the target directory. So one could write a Pattern like
  this for libaccounts's services:

    Pattern: ${home}/.local/share/accounts/services/${id}_${basename}

  Then also the manifest file should allow specifying a list of files:

  "hooks": {
      "example-app": {
        "apparmor": "apparmor/example-app.json",
        "desktop": "example-app.desktop",
        "account-service": ["cool-email.service", "cool-chat.service"]
      }
    }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/click/+bug/1245826/+subscriptions