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, 25 insertions, 1 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index 2605831..4483843 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -26,6 +26,8 @@ use pkg
cmd_install_optstring='a:P:m:F'
cmd_install_deps=
cmd_install_fnames=
+cmd_install_md5sums=
+cmd_install_sha256sums=
cmd_install_feed_url=
cmd_install_main()
@@ -130,6 +132,8 @@ cmd_install_find_pkgs()
cmd_install_deps=
cmd_install_fnames=
+ cmd_install_md5sums=
+ cmd_install_sha256sums=
fopen "${chroot}/.prokit/packages" 'w'
pkgs_fd=${FD}
@@ -147,7 +151,9 @@ cmd_install_find_pkgs()
cmd_install_feed_url="${feed%/*}"
feed_find_pkgs "${chroot}/var/lib/opkg/lists/${feed_idx}" \
"$(profile_dep_fields)" profile_include_pkg \
- cmd_install_deps_cb cmd_install_fname_cb >&${pkgs_fd}
+ cmd_install_deps_cb cmd_install_fname_cb \
+ cmd_install_md5sum_cb cmd_install_sha256sum_cb \
+ >&${pkgs_fd}
done <<-EOF
$(profile_feeds "${mirror}" "${arch}" "${plat}" "${suite}")
EOF
@@ -179,6 +185,24 @@ cmd_install_fname_cb()
"${pkg}" "${cmd_install_feed_url}" "${fname}")"
}
+cmd_install_md5sum_cb()
+{
+ local pkg="${1}"
+ local md5sum="${2}"
+
+ cmd_install_md5sums="$(printf '%s\n%s %s' "${cmd_install_md5sums}" \
+ "${pkg}" "${md5sum}")"
+}
+
+cmd_install_sha256sum_cb()
+{
+ local pkg="${1}"
+ local sha256sum="${2}"
+
+ cmd_install_sha256sums="$(printf '%s\n%s %s' \
+ "${cmd_install_sha256sums}" "${pkg}" "${sha256sum}")"
+}
+
cmd_install_get_pkgs()
{
local chroot="${1}"