diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-11-13 13:43:50 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-11-23 11:20:39 +0100 |
commit | b4ac8de1cfa29f1882c6bfee4b0f2b394e31daf2 (patch) | |
tree | 3edc7fed017e9442c3530c0ceaaa8fadb3db5a37 | |
parent | 04e85e7f81378ef64976e764e768e2aeb627b4d3 (diff) | |
download | ptxdist-b4ac8de1cfa29f1882c6bfee4b0f2b394e31daf2.tar.gz ptxdist-b4ac8de1cfa29f1882c6bfee4b0f2b394e31daf2.tar.xz |
add install_alternative_tree command for targetinstall
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | rules/post/install.make | 24 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 10 |
2 files changed, 34 insertions, 0 deletions
diff --git a/rules/post/install.make b/rules/post/install.make index 0fc4b3b3e..35b00349b 100644 --- a/rules/post/install.make +++ b/rules/post/install.make @@ -139,6 +139,30 @@ install_tree = \ echo "ptxd_install_tree '$$DIR' '$$DST' '$$OWN' '$$GRP' '$$STRIP'" >> "$(STATEDIR)/$$XPKG.cmds" # +# install_alternative_tree +# +# Installs all files and subdirectories with user/group ownership and +# permissions via fakeroot. +# +# +# $1: xpkg label +# $2: OWN, use '-' to use the real UID of each file/directory +# $3: GID, use '-' to use the real GID of each file/directory +# $4: the toplevel directory, searched for like install_alternative +# $5: strip +# $6: the target directory (optional) +# +install_alternative_tree = \ + XPKG=$(subst _,-,$(strip $(1))); \ + OWN=$(strip $(2)); \ + GRP=$(strip $(3)); \ + DIR=$(strip $(4)); \ + STRIP=$(strip $(5)); \ + DST=$(strip $(6)); \ + $(call install_check, install_alternative_tree); \ + echo "ptxd_install_alternative_tree '$$DIR' '$$DST' '$$OWN' '$$GRP' '$$STRIP'" >> "$(STATEDIR)/$$XPKG.cmds" + +# # install_archive # # Installs all files and directories in an archive with user/group ownership and diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index 38225357e..89d631974 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -463,6 +463,16 @@ ptxd_install_tree() { } export -f ptxd_install_tree +ptxd_install_alternative_tree() { + local cmd="alternative" + local src="${1}" + local dst="${2}" + shift 2 + ptxd_install_find "${src}" "${dst:-${src}}" "$@" || + ptxd_install_error "install_alternative_tree failed!" +} +export -f ptxd_install_alternative_tree + ptxd_install_archive() { local archive="$1" shift |