diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-06-19 10:55:08 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-06-19 10:55:08 +0200 |
commit | 00f1fd6292c017de0a14fdc9d09bf2daa5f89d02 (patch) | |
tree | 53637acbfaf465d808a872ab9624cf729b138783 /scripts/lib/ptxd_make_xpkg_prepare.sh | |
parent | 1903bd0109a88bf0e8c9938f888dcfcc631351be (diff) | |
download | ptxdist-00f1fd6292c017de0a14fdc9d09bf2daa5f89d02.tar.gz ptxdist-00f1fd6292c017de0a14fdc9d09bf2daa5f89d02.tar.xz |
ptxd_make_xpkg_deps: move to where it's used now
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_xpkg_prepare.sh')
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_prepare.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_prepare.sh b/scripts/lib/ptxd_make_xpkg_prepare.sh index 06edd1a03..eeb93565e 100644 --- a/scripts/lib/ptxd_make_xpkg_prepare.sh +++ b/scripts/lib/ptxd_make_xpkg_prepare.sh @@ -11,6 +11,41 @@ # # +# collect dependencies +# +# in some rare cases there is more than one xpkg per package and/or +# the names don't correspond, so we have to use the mapping file +# +# in: $pkg_deps (space seperated) +# out: $pkg_xpkg_deps (array) +# +ptxd_make_xpkg_deps() { + # do deps + if [ -z "${pkg_deps}" ]; then + return + fi + + set -- ${pkg_deps[*]} + + local dep + while [ ${#} -ne 0 ]; do + local map="${ptx_state_dir}/${1}.xpkg.map" + shift + + if [ \! -e "${map}" ]; then + continue + fi + + while read dep; do + pkg_xpkg_deps=( "${pkg_xpkg_deps[@]}" "${dep}" ) + done < "${map}" + done +} +export -f ptxd_make_xpkg_deps + + + +# # ptxd_make_xpkg_prepare() { local dep |