diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-software.sh | 2 | ||||
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 10 | ||||
-rw-r--r-- | src/core/procedures/base | 12 |
3 files changed, 10 insertions, 14 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh index dd717ca..77f99ec 100644 --- a/src/core/libs/lib-software.sh +++ b/src/core/libs/lib-software.sh @@ -23,7 +23,7 @@ run_mkinitcpio() installpkg() { notify "Package installation will begin now. You can watch the output in the progress window. Please be patient." target_special_fs on - run_background pacman-installpkg "$PACMAN_TARGET -S $PACKAGES" /tmp/pacman.log + run_background pacman-installpkg "$PACMAN_TARGET -S $TARGET_PACKAGES" /tmp/pacman.log follow_progress " Installing... Please Wait " /tmp/pacman.log wait_for pacman-installpkg diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 2b2859a..cb9775a 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -393,21 +393,21 @@ interactive_select_packages() { # so we can get package lists target_prepare_pacman || ( notify "Pacman preparation failed! Check $LOG for errors." && return 1 ) - # show group listing for group selection + # show group listing for group selection, base is ON by default, all others are OFF local _catlist="base ^ ON" for i in $($PACMAN -Sg | sed "s/^base$/ /g"); do _catlist="${_catlist} ${i} - OFF" done _dia_DIALOG --checklist "Select Package Categories\nDO NOT deselect BASE unless you know what you're doing!" 19 55 12 $_catlist 2>$ANSWER || return 1 - _catlist="$(cat $ANSWER)" + _catlist="$(cat $ANSWER)" # _catlist now contains all categories (the tags from the dialog checklist) # assemble a list of packages with groups, marking pre-selected ones # <package> <group> <selected> - local _pkgtmp="$($PACMAN -Sl core | awk '{print $2}')" + local _pkgtmp="$($PACMAN -Sl core | awk '{print $2}')" # all packages in core repository local _pkglist='' - $PACMAN -Si $_pkgtmp | \ + $PACMAN -Si $_pkgtmp | \ awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }' > $ANSWER while read pkgname pkgcat; do # check if this package is in a selected group @@ -423,7 +423,7 @@ interactive_select_packages() { _pkglist="$(echo "$_pkglist" | sort -f -k 2)" _dia_DIALOG --checklist "Select Packages To Install." 19 60 12 $_pkglist 2>$ANSWER || return 1 - PACKAGES="$(cat $ANSWER)" + TARGET_PACKAGES="$(cat $ANSWER)" # contains now all package names return 0 } diff --git a/src/core/procedures/base b/src/core/procedures/base index ba4f6c2..cae433e 100644 --- a/src/core/procedures/base +++ b/src/core/procedures/base @@ -92,23 +92,19 @@ worker_prepare_disks () } -# Put the list of packages to be installed in $var_PKG_FILE +# Put the list of packages to be installed in $TARGET_PACKAGES worker_package_list () { - #TODO: sensible list of packages + #TODO: sensible list of packages. maybe just 'base' true } worker_install_packages () { - target_special_fs on target_prepare_pacman - [ ! -f $var_PKG_FILE ] && die_error "No package file available!" - PKGLIST=`cat $var_PKG_FILE` - #TODO: what if $var_PKG_FILE is empty? we should die_error because that's probably not what the user wants.. or can it? will pacman complain? - $PACMAN_TARGET -Sy $PKGLIST || die_error "Package installation FAILED." - target_special_fs off + [ -z "$TARGET_PACKAGES" ] && die_error "No packages listed to be installed!" + installpkg } |