diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 11:06:05 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 11:06:05 +0100 |
commit | d06c0d0403c0747bd088e25ca28329c710dedf73 (patch) | |
tree | 4c1055fb4e584d080f95a8cbf5ef115d6e14ac20 | |
parent | bf091ae0928d38f8bea7858dc3b06cefca472cb9 (diff) |
fixes for cleaner package installation
-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 | ||||
-rw-r--r-- | unofficial/modules/dieter/procedures/automatic | 2 |
4 files changed, 12 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 } diff --git a/unofficial/modules/dieter/procedures/automatic b/unofficial/modules/dieter/procedures/automatic index 9bea7a6..75b08d9 100644 --- a/unofficial/modules/dieter/procedures/automatic +++ b/unofficial/modules/dieter/procedures/automatic @@ -64,6 +64,8 @@ EOF worker_package_list () { $SVN export $SVN_BASE/ddm-configs/$TARGET_HOST/trunk/package-list $var_PKG_FILE || die_error "Could not export package list!" + TARGET_PACKAGES=`cat $var_PKG_FILE` # beware, there are newlines in it now + TARGET_PACKAGES=`echo $TARGET_PACKAGES` # not anymore :) } |