summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-11-26 19:32:26 +0100
committerDave Reisner <dreisner@archlinux.org>2011-11-29 11:56:42 +0100
commit19e7923b82fc34ba7086a93da55add84e8a08b67 (patch)
tree19f396989d5414293e336e9a5de11af0bed59127
parent92bb7121cab14dbb35c30deb7b15f1fb4cc7eefb (diff)
downloadmkinitcpio-19e7923b82fc34ba7086a93da55add84e8a08b67.tar.gz
mkinitcpio-19e7923b82fc34ba7086a93da55add84e8a08b67.tar.xz
functions: don't allow add_binary to re-add deps
Since we now silently overwrite instead of silently failing on existing files and symlinks, we have a lot of sodeps which are overwritten by various binaries -- udevd and udevadm being one example. Nip this in add_binary by doing our own check and preventing addition of pre-existing files in the $BUILDROOT. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions b/functions
index 857a613..7af23c1 100644
--- a/functions
+++ b/functions
@@ -316,7 +316,7 @@ add_binary() {
while read line; do
[[ "$line" =~ $regex ]] && sodep=${BASH_REMATCH[1]} || continue
- if [[ -f "$sodep" ]]; then # -f follows symlinks, don't believe it!
+ if [[ -f $sodep && ! -e $BUILDROOT$sodep ]]; then
if [[ ! -L $sodep ]]; then
_add_file "$sodep" "$BASEDIR$sodep" "$(stat -c %a "$sodep")"
else