summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-05 18:10:00 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-05 18:10:00 +0100
commit839ade1073032d841a3823e0a25d0ded19cc8b71 (patch)
treed97a513f1b53e8ac0e6faa6e724c344b86296748 /src/core/libs/lib-ui-interactive.sh
parentaebbe84b8e5c195e2c6238f6e1770f41b0612a9c (diff)
make AIF track needed filesystem packages
filesystem packages are scheduled to go out of base, hence AIF must track which ones are needed and which are not by keeping an eye open during the filesystems creation (and rollback) steps. In the interactive procedure, the appropriate packages will be preselected, in the automatic procedure, you're supposed to configure the needed packages yourself now. This is reflected in the examples.
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 8d1acc8..4351e48 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -750,7 +750,8 @@ interactive_select_packages() {
repos=`list_pacman_repos target`
notify "Package selection is split into two stages. First you will select package groups that contain packages you may be interested in. Then you will be presented with a full list of packages for each group, allowing you to fine-tune.\n\n
-Note that right now the packages (and groups) selection is limited to the repos available at this time ($repos). Once you have your Arch system up and running, you have access to more repositories and packages."
+Note that right now the packages (and groups) selection is limited to the repos available at this time ($repos). Once you have your Arch system up and running, you have access to more repositories and packages.\n\n
+If any previous configuration you've done until now (like fancy filesystems) require extra packages, we've already preselected them for your convenience"
# show group listing for group selection, base is ON by default, all others are OFF
local _grouplist="base ^ ON"
@@ -763,14 +764,17 @@ Note that right now the packages (and groups) selection is limited to the repos
# assemble a list of packages with groups, marking pre-selected ones
# <package> <group> <selected>
- local _pkgtmp="$(list_packages repo core | awk '{print $2}')" # all packages in core repository
+ local _pkgtmp="$(list_packages repo core | awk '{print $2}')" # all packages in core repository. TODO: we should use $repos here
local _pkglist=''
which_group "$_pkgtmp"
+ # assemble some packages which we'll definitely select by default because we figured out we'll need them:
+ needed_pkgs=("${needed_pkgs_fs[@]}")
while read pkgname pkggroup; do
# check if this package is in a selected group
# slightly ugly but sorting later requires newlines in the variable
- if [ "${_grouplist/"\"$pkggroup\""/XXXX}" != "${_grouplist}" ]; then
+ if [ "${_grouplist/"\"$pkggroup\""/XXXX}" != "${_grouplist}" ] || check_is_in $pkgname "${needed_pkgs[@]}"
+ then
_pkglist="$(echo -e "${_pkglist}\n${pkgname} ${pkggroup} ON")"
else
_pkglist="$(echo -e "${_pkglist}\n${pkgname} ${pkggroup} OFF")"