summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/ptxd_make_install.sh11
-rw-r--r--scripts/lib/ptxd_make_world_clean.sh4
-rw-r--r--scripts/lib/ptxd_make_world_common.sh5
-rw-r--r--scripts/lib/ptxd_make_xpkg_finish.sh12
4 files changed, 17 insertions, 15 deletions
diff --git a/scripts/lib/ptxd_make_install.sh b/scripts/lib/ptxd_make_install.sh
index 6cd2ff6f3..539318291 100644
--- a/scripts/lib/ptxd_make_install.sh
+++ b/scripts/lib/ptxd_make_install.sh
@@ -140,23 +140,22 @@ ptxd_make_install_fixup() {
#
# track "pkg name" to "xpkg filename"
#
- local xpkg_map="${STATEDIR}/${target}.xpkg.map"
- if [ -e "${xpkg_map}" ]; then
- sed -i -e "/^${replace_to}$/d" "${xpkg_map}" &&
+ if [ -e "${pkg_xpkg_map}" ]; then
+ sed -i -e "/^${replace_to}$/d" "${pkg_xpkg_map}" &&
- if [ -s "${xpkg_map}" ]; then
+ if [ -s "${pkg_xpkg_map}" ]; then
cat >&2 <<EOF
${PREFIX}warning: more than one ipkg per PTXdist package detected:
pkg: '${target}'
-ipkg: '${replace_to}' and '$(cat "${xpkg_map}")'
+ipkg: '${replace_to}' and '$(cat "${pkg_xpkg_map}")'
EOF
fi
fi &&
- echo "${replace_to}" >> "${xpkg_map}" || return
+ echo "${replace_to}" >> "${pkg_xpkg_map}" || return
;;
diff --git a/scripts/lib/ptxd_make_world_clean.sh b/scripts/lib/ptxd_make_world_clean.sh
index f173ac1db..87b7ab994 100644
--- a/scripts/lib/ptxd_make_world_clean.sh
+++ b/scripts/lib/ptxd_make_world_clean.sh
@@ -13,9 +13,9 @@
ptxd_make_world_clean() {
ptxd_make_world_init &&
- if [ -f "${ptx_state_dir}/${pkg_label}.xpkg.map" ]; then
+ if [ -f "${pkg_xpkg_map}" ]; then
echo "Deleting ipks:"
- for name in $(cat "${ptx_state_dir}/${pkg_label}.xpkg.map" 2>/dev/null); do
+ for name in $(cat "${pkg_xpkg_map}" 2>/dev/null); do
ls "${ptx_pkg_dir}/${name}"_*.ipk
rm -f "${ptx_pkg_dir}/${name}"_*.ipk
done
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index 452320586..04036337d 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -222,6 +222,11 @@ ptxd_make_world_init() {
ptxd_make_world_init_compat || return
#
+ # xpkg mapping
+ #
+ pkg_xpkg_map="${ptx_state_dir}/${pkg_label}.xpkg.map"
+
+ #
# path
#
local path_ptr="ptx_path_${pkg_type}"
diff --git a/scripts/lib/ptxd_make_xpkg_finish.sh b/scripts/lib/ptxd_make_xpkg_finish.sh
index 6c4790492..47d8dfe47 100644
--- a/scripts/lib/ptxd_make_xpkg_finish.sh
+++ b/scripts/lib/ptxd_make_xpkg_finish.sh
@@ -30,16 +30,15 @@ ptxd_make_xpkg_deps() {
local dep
while [ ${#} -ne 0 ]; do
- local map="${ptx_state_dir}/${1}.xpkg.map"
shift
- if [ \! -e "${map}" ]; then
+ if [ \! -e "${pkg_xpkg_map}" ]; then
continue
fi
while read dep; do
pkg_xpkg_deps=( "${pkg_xpkg_deps[@]}" "${dep}" )
- done < "${map}"
+ done < "${pkg_xpkg_map}"
done
}
export -f ptxd_make_xpkg_deps
@@ -61,11 +60,10 @@ ptxd_make_xpkg_finish() {
ptxd_warning "Packet '${pkg_xpkg}' is empty. not generating"
rm -rf -- "${pkg_xpkg_tmp}"
- local xpkg_map="${STATEDIR}/${pkg_xpkg}.xpkg.map"
- sed -i -e "/^${pkg_xpkg}$/d" "${xpkg_map}" #FIXME: we rely in 1-to-1 mapping here
+ sed -i -e "/^${pkg_xpkg}$/d" "${pkg_xpkg_map}" #FIXME: we rely in 1-to-1 mapping here
- if [ \! -s "${xpkg_map}" ]; then
- rm -f -- "${xpkg_map}"
+ if [ \! -s "${pkg_xpkg_map}" ]; then
+ rm -f -- "${pkg_xpkg_map}"
fi
return
fi