summaryrefslogtreecommitdiffstats
path: root/lib/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cmd')
-rw-r--r--lib/cmd/install.sh26
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index efbd551..02f09bc 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -23,6 +23,8 @@ use profile
use fd
cmd_install_optstring='a:P:m:'
+cmd_install_deps=
+cmd_install_fnames=
cmd_install_main()
{
@@ -105,14 +107,16 @@ cmd_install_find_pkgs()
fopen "${chroot}/etc/opkg/opkg.conf" 'w'
opkg_conf_fd=${FD}
+ cmd_install_deps=
+ cmd_install_fnames=
+
while read -r feed_idx feed; do
printf 'src %s %s\n' "${feed_idx}" "${feed}" >&${opkg_conf_fd}
feed_download "${feed}" \
>"${chroot}/var/lib/opkg/lists/${feed_idx}"
feed_find_pkgs "${chroot}/var/lib/opkg/lists/${feed_idx}" \
- "$(profile_dep_fields)" 'profile_include_pkg' \
- "${chroot}/.prokit/${feed_idx}.depends" \
- "${chroot}/.prokit/${feed_idx}.filenames" \
+ "$(profile_dep_fields)" profile_include_pkg \
+ cmd_install_deps_cb cmd_install_fname_cb \
>>"${chroot}/.prokit/packages"
done <<-EOF
$(profile_feeds "${mirror}" "${arch}" "${plat}" "${suite}")
@@ -122,3 +126,19 @@ cmd_install_find_pkgs()
printf 'arch %s 1\n' 'all' "${arch}" 'src' >&${opkg_conf_fd}
fclose ${opkg_conf_fd}
}
+
+cmd_install_deps_cb()
+{
+ local pkg="${1}"
+ local deps="${2}"
+
+ cmd_install_deps="${cmd_install_deps}${pkg}: ${deps}${LF}"
+}
+
+cmd_install_fname_cb()
+{
+ local pkg="${1}"
+ local fname="${2}"
+
+ cmd_install_fnames="${cmd_install_fnames}${pkg} ${fname}${LF}"
+}