aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-10-27 15:38:03 +0000
committermerakor <cem@ckyln.com>2021-10-27 15:38:03 +0000
commitde85a3911d03e818743f83ea118b224f6d765c1b (patch)
tree4687d4e4f466af926fb163967d1fd38d06697d63
parentf6e1a09888dda127bcdae8189dace61fd37526e6 (diff)
downloadcpt-de85a3911d03e818743f83ea118b224f6d765c1b.tar.gz
docs: update
FossilOrigin-Name: 0769672efd452ef4cdc0e0025ecd1455be76ffcc74291c040be0720b191e3590
-rw-r--r--src/cpt-lib.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 09b78e1..581d281 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -2029,8 +2029,15 @@ pkg_get_base() (
# subshell. That is our purpose here, thank you very much.
# shellcheck disable=SC2030
while read -r pkgname _; do
+ # Ignore comments
[ "${pkgname##\#*}" ] || continue
+
+ # Store the package list in arguments
set -- "$@" "$pkgname"
+
+ # Retrieve the dependency tree of the package, so they are listed as
+ # base packages too. This ensures that no packages are broken in a
+ # "base reset", and the user has a working base.
deps=$(pkg_gentree "$pkgname" xn)
for dep in $deps; do
contains "$*" "$dep" || set -- "$@" "$dep"