Allow applying a hook to multiple files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
click (Ubuntu) |
In Progress
|
Wishlist
|
Unassigned |
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/
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}
Then also the manifest file should allow specifying a list of files:
"hooks": {
"example-app": {
"apparmor": "apparmor/
"desktop": "example-
"
}
}
Related branches
- Alberto Mardegan (community): Disapprove
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Colin Watson: Needs Fixing
-
Diff: 203 lines (+112/-6)3 files modifiedclick/hooks.py (+12/-5)
click/tests/test_hooks.py (+85/-0)
doc/hooks.rst (+15/-1)
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- click hackers: Pending requested
-
Diff: 299 lines (+103/-32)3 files modifiedclick/tests/gimock.py (+2/-1)
click/tests/test_hooks.py (+46/-2)
lib/click/hooks.vala (+55/-29)
Changed in click (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in click (Ubuntu): | |
status: | Triaged → In Progress |
It would also be helpful to apply hooks to directories recursively