charm build dereferences symlinks in built charm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| charm-tools (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
Running charm 2.2.2/charm-tools 2.2.3 via latest stable snap, I find that the symlinks in the hooks and actions directories of my charms end up deferenced such that the resulting charm has X copies of the file that was originally symlinked to things such as hooks/config-
As an example:
Charm Source:
drew@grimoire:
total 156
drwxr-xr-x 6 drew drew 4096 Oct 18 23:11 charmhelpers
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 config-changed -> hooks.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 hanode-
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 hanode-
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 ha-relation-changed -> hooks.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 ha-relation-joined -> hooks.py
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 hooks.py
-rwxr-xr-x 1 drew drew 421 Oct 18 23:11 install
lrwxrwxrwx 1 drew drew 8 Oct 18 23:11 install.real -> hooks.py
-rw-r--r-- 1 drew drew 2318 Jan 31 2017 maas.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 nrpe-external-
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 nrpe-external-
-rw-r--r-- 1 drew drew 6336 Oct 18 23:11 pcmk.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 start -> hooks.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 stop -> hooks.py
lrwxrwxrwx 1 drew drew 8 Jan 31 2017 upgrade-charm -> hooks.py
-rw-r--r-- 1 drew drew 30003 Oct 18 23:11 utils.py
Charm build output:
drew@grimoire:
total 420
drwxr-xr-x 6 drew drew 4096 Feb 21 11:32 charmhelpers
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 config-changed
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 hanode-
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 hanode-
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 ha-relation-changed
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 ha-relation-joined
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 hooks.py
-rwxr-xr-x 1 drew drew 421 Oct 18 23:11 install
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 install.real
-rw-r--r-- 1 drew drew 2318 Jan 31 2017 maas.py
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 nrpe-external-
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 nrpe-external-
-rw-r--r-- 1 drew drew 6336 Oct 18 23:11 pcmk.py
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 start
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 stop
-rwxrwxr-x 1 drew drew 17449 Dec 22 16:23 upgrade-charm
-rw-r--r-- 1 drew drew 30003 Oct 18 23:11 utils.py
This both makes charm authoring/debugging more difficult and adds unnecessary size to the built charm.