diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-11-26 19:32:26 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-11-29 11:56:42 +0100 |
commit | 19e7923b82fc34ba7086a93da55add84e8a08b67 (patch) | |
tree | 19f396989d5414293e336e9a5de11af0bed59127 | |
parent | 92bb7121cab14dbb35c30deb7b15f1fb4cc7eefb (diff) | |
download | mkinitcpio-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-- | functions | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |