diff options
author | Ben Finney <ben@benfinney.id.au> | 2008-09-28 11:42:53 -0700 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2008-09-28 11:42:53 -0700 |
commit | a6b59a4a0283546e4e596be39f3c7e8fed8cb114 (patch) | |
tree | 4a992dac3e868073f6be0e5b136c638e9a0e961f /pbuilder-runhooks | |
parent | 0de2f647f98c55d7a6988e2e29c7949bea0bc054 (diff) | |
download | pbuilder-a6b59a4a0283546e4e596be39f3c7e8fed8cb114.tar pbuilder-a6b59a4a0283546e4e596be39f3c7e8fed8cb114.tar.gz |
Dereference symlinks when copying hooks. (closes: #499358)
I keep a number of different hooks in my $HOME/.pbuilder/hooks/
directory, and some are symlinks to files outside that directory.
When 'pbuilder-runhooks' copies the hooks, it copies them without
dereference, which fails inside the chroot since the referenced files
are not found.
The attached patch, generated using 'git format-patch', fixes this by
using the '-L' ('--dereference') option to 'cp' when copying the hook
files into the pbuilder chroot.
Diffstat (limited to 'pbuilder-runhooks')
-rw-r--r-- | pbuilder-runhooks | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbuilder-runhooks b/pbuilder-runhooks index 1bf66b7..ac500a2 100644 --- a/pbuilder-runhooks +++ b/pbuilder-runhooks @@ -37,8 +37,8 @@ function loadhooks () { fi if [ -d "$HOOKDIR" ]; then mkdir -p "$BUILDPLACE/$hooks" - if ! cp -a "$HOOKDIR/"* "$BUILDPLACE/$hooks"; then - echo "W: no hooks found on the hookdir" >&2 + if ! cp -aL "$HOOKDIR/"* "$BUILDPLACE/$hooks"; then + echo "W: no hooks found in the hookdir '$HOOKDIR'" >&2 fi fi } |