From de85a3911d03e818743f83ea118b224f6d765c1b Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 27 Oct 2021 15:38:03 +0000 Subject: docs: update FossilOrigin-Name: 0769672efd452ef4cdc0e0025ecd1455be76ffcc74291c040be0720b191e3590 --- src/cpt-lib.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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" -- cgit v1.2.3