summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-12 19:59:14 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-12 19:59:14 +0100
commit9f34485bed2aa77e312575dc0217d9ad672755d4 (patch)
tree00eebdb0b74f251f05c91e83329c4b7c8aef9edb /src
parent780ecacd6e3a69b238834044342e2d7b9bedd90a (diff)
cleanup some TODO's and other cruft
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-pacman.sh19
-rw-r--r--src/core/libs/lib-software.sh3
-rw-r--r--src/core/libs/lib-ui-interactive.sh12
-rw-r--r--src/core/procedures/automatic13
-rw-r--r--src/core/procedures/base6
5 files changed, 15 insertions, 38 deletions
diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh
index 2eb1264..21c944c 100644
--- a/src/core/libs/lib-pacman.sh
+++ b/src/core/libs/lib-pacman.sh
@@ -87,7 +87,7 @@ done
[ ! -d "${var_TARGET_DIR}/var/lib/pacman" ] && mkdir -m 755 -p "${var_TARGET_DIR}/var/lib/pacman"
inform "Refreshing package database..."
- $PACMAN_TARGET -Sy >$LOG 2>&1 || return 1 #TODO: make sure this also goes into the logfile. actually we should do this for many commands.
+ $PACMAN_TARGET -Sy >$LOG 2>&1 || return 1
return 0
}
@@ -118,21 +118,6 @@ ${3}
EOF
}
-
-# taken from quickinst. TODO: figure this one out ASKDEV
-pacman_what_is_this_for ()
-{
- PKGLIST=
- # fix pacman list!
- sed -i -e 's/-i686//g' -e 's/-x86_64//g' $PKGFILE
- for i in $(cat $PKGFILE | grep 'base/' | cut -d/ -f2); do
- nm=${i%-*-*}
- PKGLIST="$PKGLIST $nm"
- done
- ! [ -d $var_TARGET_DIR/var/lib/pacman ] && mkdir -p $var_TARGET_DIR/var/lib/pacman
- ! [ -d /var/lib/pacman ] && mkdir -p /var/lib/pacman
-}
-
list_package_groups ()
{
$PACMAN_TARGET -Sg
@@ -143,7 +128,6 @@ list_package_groups ()
# <repo/group name> packagename [version, if $1=repo]
# $1 repo or group
# $2 one or more repo or group names
-# TODO: check the validity of the specified names in $2
list_packages ()
{
[ "$1" = repo -o "$1" = group ] || die_error "list_packages \$1 must be repo or group. not $1!"
@@ -155,7 +139,6 @@ list_packages ()
# $1 packages separated by spaces
# output format: multiple lines, each line like:
# <pkgname> <group>
-# TODO: check $1
which_group ()
{
PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si $1| awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'`
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index caf5d92..467e658 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -44,7 +44,6 @@ installpkg() {
notify "Package installation will begin now. You can watch the output in the progress window. Please be patient."
- #TODO: There may be something wrong here. See http://projects.archlinux.org/?p=installer.git;a=commitdiff;h=f504e9ecfb9ecf1952bd8dcce7efe941e74db946 ASKDEV (Simo)
run_controlled pacman_installpkg "$PACMAN_TARGET --noconfirm -S $ALL_PACKAGES" $TMP_PACMAN_LOG "Installing... Please Wait"
local _result=''
@@ -80,4 +79,4 @@ target_locale-gen ()
{
inform "Generating glibc base locales..."
chroot ${var_TARGET_DIR} locale-gen >/dev/null
-} \ No newline at end of file
+}
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 5a87b9a..3fd1665 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -1,6 +1,5 @@
#!/bin/bash
-#TODO: get backend code out of here!!
-
+# A library which allows you to do backend stuff by using user interfaces
# check if a worker has completed successfully. if not -> tell user he must do it + return 1
# if ok -> don't warn anything and return 0
@@ -200,7 +199,6 @@ interactive_prepare_disks ()
default=no
[ -n "$NEXTITEM" ] && default="$NEXTITEM"
- #TODO: inform user (using dialog's --item-help or so) that autoprepare uses 1 disk and uses it in a "fairly regular" (though somewhat customizable) manner.
ask_option $default "Prepare Hard Drive" '' required \
"1" "Auto-Prepare (erases an ENTIRE hard drive and sets up partitions, filesystems and mountpoints)" \
"2" "Manually Partition Hard Drives" \
@@ -211,7 +209,7 @@ interactive_prepare_disks ()
case $ANSWER_OPTION in
"1")
[ "$BLOCK_ROLLBACK_USELESS" = "0" ] && ask_yesno "You should probably rollback your last changes first, otherwise this will probably fail. Go back to menu to do rollback?" && NEXTITEM=4 && continue
- interactive_autoprepare && NEXTITEM=5 && ret=0 && DISK_CONFIG_TYPE=auto;; #TODO: for some reason. if this completes $?=0, next item will be 1 :/
+ interactive_autoprepare && NEXTITEM=5 && ret=0 && DISK_CONFIG_TYPE=auto;;
"2")
[ "$BLOCK_ROLLBACK_USELESS" = "0" ] && ask_yesno "You should probably rollback your last changes first, otherwise this will probably fail. Go back to menu to do rollback?" && NEXTITEM=4 && continue
interactive_partition && ret=1 && NEXTITEM=3 && DISK_CONFIG_TYPE=manual
@@ -228,7 +226,7 @@ interactive_prepare_disks ()
fi
if [ $? -eq 0 -o "$BLOCK_ROLLBACK_USELESS" = "0" ]
then
- if rollback_filesystems #TODO: this part doesn't belong here. move it to ui-interactive. (interactive_rollback)
+ if rollback_filesystems
then
inform "Rollback succeeded"
else
@@ -281,7 +279,7 @@ interactive_autoprepare()
do
ask_number "Enter the size (MiB) of your / partition. Recommended size:7500. The /home partition will use the remaining space.\n\nDisk space left: $BLOCKDEVICE_SIZE MiB" 1 $BLOCKDEVICE_SIZE 7500 || return 1
ROOT_PART_SIZE=$ANSWER_NUMBER
- ask_yesno "$(($BLOCKDEVICE_SIZE-$ROOT_PART_SIZE)) MiB will be used for your /home partition. Is this OK?" yes && ROOT_PART_SET=1 #TODO: when doing yes, cli mode prints option JFS all the time, dia mode goes back to disks menu
+ ask_yesno "$(($BLOCKDEVICE_SIZE-$ROOT_PART_SIZE)) MiB will be used for your /home partition. Is this OK?" yes && ROOT_PART_SET=1
done
ask_option no 'Filesystem selection' "Select a filesystem for / and /home:" required ${FSOPTS[@]} || return 1
@@ -384,7 +382,7 @@ interactive_filesystem ()
ask_option edit "Change $fs_type filesystem settings on $part ?" \
"Change $fs_type filesystem settings (create:$fs_create, label:$fs_label, mountpoint:$fs_mountpoint) on $part (type:$part_type, label:$part_label) ?" required \
- edit EDIT delete DELETE #TODO: nicer display if label is empty etc
+ edit EDIT delete DELETE
# Don't alter, and return if user cancels
[ $? -gt 0 ] && NEW_FILESYSTEM=$fs_string && return 0
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index 6fdc1d8..6aa69b9 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -1,18 +1,17 @@
#!/bin/bash
-# This is a procedure for automatic deployment/installation/configuration of systems. # TODO: document! (readme, notes about deployment profiles, examples, ...)
+# This is a procedure for automatic deployment/installation/configuration of systems.
# check /usr/share/aif/examples for some example config files.
# This procedure can easily replace the old quickinst script if you look at the "generic install" config file
# Look at the base procedure to see the phases and which workers they'll execute.
# It should be:
# phase_preparation=(configure intro sysprep select_source runtime_network runtime_repositories runtime_packages)
# phase_basics=(set_clock prepare_disks)
-# phase_system=(package_list install_packages auto_fstab auto_networkTODO auto_locale auto_keymap_font configure_system mkinitcpio locales install_bootloader)
+# phase_system=(package_list install_packages auto_fstab auto_network auto_locale auto_keymap_font configure_system mkinitcpio locales install_bootloader)
# phase_finish=(msg_report)
# In theory, the only manual thing should maybe be configuring the runtime network and putting the configfile in place
-# TODO: I don't know if you can do non-interactive dm_crypt stuff.. maybe by pulling luks keyfiles from svn/git/..?
-# TODO: for worker_configure_system, we probably want the user to specify hostname, root pass etc.
-# TODO: implement setting hostname, keymap, consolefont, network settings
+# I don't know if you can do non-interactive dm_crypt stuff.. maybe by pulling luks keyfiles from svn/git/..?
+# TODO: implement setting hostname, keymap, consolefont, network settings, root pass, etc
# for a list of recognized variables, see examples/generic-install-on-sda
depend_procedure core base
@@ -110,7 +109,7 @@ worker_package_list ()
worker_install_packages ()
{
- target_prepare_pacman core extra community #TODO: it would be better if this was a separate worker, i think
+ target_prepare_pacman core extra community
installpkg
}
@@ -123,7 +122,7 @@ worker_set_clock ()
worker_auto_network () {
- # temporary override because i need to implement this
+ #TODO implement this
true
}
diff --git a/src/core/procedures/base b/src/core/procedures/base
index 98a816b..d57a625 100644
--- a/src/core/procedures/base
+++ b/src/core/procedures/base
@@ -1,6 +1,6 @@
#!/bin/bash
-#TODO: make this profile work on itself, eg some stuff from inheriting profiles should be moved in, stuff implemented etc
+# this procedure is meant to be inherited from
var_DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3"
var_TARGET_DIR="/mnt" # When overriding this, do _not_ add a trailing /. It's not needed and maybe you could even break something
var_RUNTIME_REPOSITORIES= # array like this ('name1' 'location of repo 1' ['name2' 'location of repo2',..])
@@ -153,7 +153,7 @@ worker_package_list ()
worker_install_packages ()
{
- target_prepare_pacman core #TODO: it would be better if this was a separate worker, i think
+ target_prepare_pacman core
installpkg
}
@@ -186,7 +186,6 @@ worker_auto_keymap_font ()
worker_configure_system ()
{
- #TODO: what to do here?
true
}
@@ -211,7 +210,6 @@ worker_initialtime ()
worker_install_bootlader ()
{
- #TODO: ask which disk, install grub on it
true
}