|
From: <cod...@go...> - 2008-07-28 21:55:26
|
Author: M0...@gm...
Date: Mon Jul 28 14:54:49 2008
New Revision: 88
Added:
branches/iVL/install-pkg (contents, props changed)
Modified:
branches/iVL/MdlInstallSys.module
branches/iVL/MdlPartFrmt.module
Log:
minor changes to the full install procedure
Modified: branches/iVL/MdlInstallSys.module
==============================================================================
--- branches/iVL/MdlInstallSys.module (original)
+++ branches/iVL/MdlInstallSys.module Mon Jul 28 14:54:49 2008
@@ -29,7 +29,8 @@
' this is where we need to set the mount target
'ClsGlobal.sTargetMnt = "/mnt/target"
- ClsGlobal.sTargetMnt = "/mnt/target" ' just for testing now.
+ 'ClsGlobal.sTargetMnt = "/mnt/target"
+ ClsGlobal.sTargetMnt = "/home/moises/mnt/target" ' just for testing now.
IF Exist(ClsGlobal.sTargetMnt) = FALSE THEN
TRY MKDIR ClsGlobal.sTargetMnt
END IF
@@ -38,12 +39,12 @@
SHELL "umount " & ClsGlobal.sTargetMnt WAIT 'clear the mount point
'/DISABLED FOR TESTING INSTALL ONLY
- SHELL "mount " & ClsPartSel.sRoot & Space(1) &
ClsGlobal.sTargetMnt WAIT 'moun the root partition first
- IF ClsPartSel.sHome THEN
- SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "home" WAIT
- SHELL "mount " & ClsPartSel.sHome & Space(1) &
ClsGlobal.sTargetMnt &/ "home -t " & LCase(ClsPartSel.fhome)
WAIT 'mount the home partition if defined
-
- END IF
+ ' SHELL "mount " & ClsPartSel.sRoot & Space(1) &
ClsGlobal.sTargetMnt WAIT 'moun the root partition first
+ ' IF ClsPartSel.sHome THEN
+ ' SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "home" WAIT
+ ' SHELL "mount " & ClsPartSel.sHome & Space(1) &
ClsGlobal.sTargetMnt &/ "home -t " & LCase(ClsPartSel.fhome)
WAIT 'mount the home partition if defined
+ '
+ ' END IF
IF ClsPartSel.sUsr THEN
SHELL "mkdir -p " & ClsGlobal.sTargetMnt &/ "usr" WAIT
SHELL "mount " & ClsPartSel.sUsr & Space(1) &
ClsGlobal.sTargetMnt &/ "usr -t" & ClsPartSel.fUsr WAIT ' mount the
user partition
@@ -240,26 +241,36 @@
PUBLIC SUB PERFORM_FULL_INSTALL()
DIM iret AS Integer
+ PRINT "Installing bulks"
+ MdlSetup.SHOW_PROGRESS_CONTROLS()
iret = ME.INSTALL_BULK_PACKAGES()
IF iret <> 0 THEN
PRINT "Error installing bulks ... exit"
RETURN
END IF
+ PRINT "installing packages"
+ MdlSetup.SHOW_PROGRESS_CONTROLS()
iret = ME.INSTALL_PACKAGES_NEW()
IF iret <> 0 THEN
PRINT "error installing packages ... exit"
RETURN
END IF
+ PRINT "Installing packages/required"
+ MdlSetup.SHOW_PROGRESS_CONTROLS()
iret = ME.INSTALL_REQUIRED_PACKAGES()
IF iret <> 0 THEN
PRINT "Error installing packages/required ... exit"
RETURN
END IF
+ PRINT "installing CONFIG packages from SETUP.CONF"
+ MdlSetup.SHOW_PROGRESS_CONTROLS()
iret = ME.INSTALL_CONFIG_PACKAGES()
IF iret <> 0 THEN
PRINT "Error installing config packages ... exit"
RETURN
END IF
+ PRINT "installing kernels"
+ MdlSetup.SHOW_PROGRESS_CONTROLS()
iret = MdlInstallCustom.INSTALL_KERNELS()
IF iret <> 0 THEN
PRINT "Error installing kernels ... exit "
Modified: branches/iVL/MdlPartFrmt.module
==============================================================================
--- branches/iVL/MdlPartFrmt.module (original)
+++ branches/iVL/MdlPartFrmt.module Mon Jul 28 14:54:49 2008
@@ -30,8 +30,10 @@
FOR EACH cb IN MdlPartSel.oFsTypes
sPart = cb.Tag
sFormat = cb.Text
+ IF cb.text <> "Do not format" THEN
PRINT " Formatting " & sPart & " to " & sFormat
ME.FORMAT_PARTITION(sPart, sFormat)
+ END IF
NEXT
PRINT "Partition formatting complete"
Added: branches/iVL/install-pkg
==============================================================================
--- (empty file)
+++ branches/iVL/install-pkg Mon Jul 28 14:54:49 2008
@@ -0,0 +1,146 @@
+#!/bin/sh
+# This code was captured from installpkg, Slackware 10, By Patric V.
+# Modified by Eko M. Budi to suit old isolinux
+# - exclude directory that will overwrite symlink
+# - get the FILE LIST from previous check
+# - capable to handle tgz, tbz, tlz
+#
+
+if [ -z "$1" ]; then
+ echo "Usage: install-pkg <package> [ROOT]"
+ exit 1
+fi
+
+package=$1
+ROOT=${ROOT:-/}
+[ "$2" ] && ROOT=$2
+ADM_DIR=$ROOT/var/log
+TMP=$ROOT/tmp
+
+mkdir -p $ADM_DIR/packages
+mkdir -p $ADM_DIR/scripts
+mkdir -p $TMP
+
+echo HO
+
+longname=`basename $package`
+packagetype=${longname##*.}
+shortname=${longname%.*}
+packagebase=`pkgname $longname`
+
+# Test tarball integrity, store the list
+rm -f $TMP/tmplist
+case $packagetype in
+ tlz)
+ lzmadec <$package | /bin/tar-1.13-pkgtools -t >$TMP/tmplist 2>/dev/null
+ ;;
+ tbz|tbz2)
+ tar -tj <$package >$TMP/tmplist 2>/dev/null
+ ;;
+ tgz)
+ tar -tz <$package >$TMP/tmplist 2>/dev/null
+ ;;
+esac
+
+TARERROR=$?
+if [ ! "$TARERROR" = "0" ]; then
+ echo "Package $package is corrupted" >> $flog
+ rm -f $TMP/tmplist
+ return 1
+fi
+
+echo HU
+
+# make sure we're not installing files on top of existing symbolic links
+# and exclude the directories that are a symlink
+# big change, by Eko M. Budi
+rm -f $TMP/exclist
+rm -f $TMP/rmvlist
+cat $TMP/tmplist | while read file ; do
+ if [ -d $ROOT/${file%/} ]; then
+ echo "$file: DIR"
+ if [ -L $ROOT/${file%/} ]; then
+ echo $file >> $TMP/exclist
+ fi
+ elif [ -L "$ROOT/$file" ] ; then
+ echo "$file: SYMLINK"
+ echo $file >> $TMP/rmvlist
+ rm -f "$ROOT/$file"
+ else
+ echo "$file: FILE"
+ fi
+done
+
+echo HI
+
+
+# Extract
+if [ -f $TMP/exclist ]; then
+ EXCLUDED="-X $TMP/exclist"
+else
+ EXCLUDED=""
+fi
+
+case $packagetype in
+ tlz)
+ lzmadec <$package | /bin/tar-1.13-pkgtools -C $ROOT -xlUpv >$TMP/$shortnam
+e 2>/dev/null
+ ;;
+ tbz|tbz2)
+ tar $EXCLUDED -C $ROOT -xjlUpv <$package >$TMP/$shortname 2>/dev/null
+ ;;
+ tgz)
+ tar $EXCLUDED -C $ROOT -xzlUpv <$package >$TMP/$shortname 2>/dev/null
+ ;;
+esac
+
+rm -f $TMP/exclist
+rm -f $TMP/tmplist
+
+# Write the package file database entry and install the package
+echo "PACKAGE NAME: $shortname" > $ADM_DIR/packages/$shortname
+echo "COMPRESSED PACKAGE SIZE: $COMPRESSED" >> $ADM_DIR/packages/$shortname
+echo "UNCOMPRESSED PACKAGE SIZE: $UNCOMPRESSED" >> $ADM_DIR/packages/$shortname
+echo "PACKAGE LOCATION: $package" >> $ADM_DIR/packages/$shortname
+echo "PACKAGE DESCRIPTION:" >> $ADM_DIR/packages/$shortname
+
+# add dependency info
+# big change, by kocil
+if [ -r $ROOT/install/slack-required ]; then
+ grep -ve '^#' $ROOT/install/slack-required | while read LINE; do
+ echo "REQUIRED: $LINE" >> $ADM_DIR/packages/$shortname 2> /dev/null
+ done
+fi
+
+if [ -r $ROOT/install/slack-desc ]; then
+ cat $ROOT/install/slack-desc | grep "^$packagebase:" >> $ADM_DIR/packages/$s
+hortname 2> /dev/null
+ if [ "$shortname" != "$packagebase" ]; then
+ cat $ROOT/install/slack-desc | grep "^$shortname:" >> $ADM_DIR/packages/$s
+hortname 2> /dev/null
+ fi
+fi
+
+echo "FILE LIST:" >> $ADM_DIR/packages/$shortname
+if [ "`cat $TMP/$shortname | grep '^./' | wc -l | tr -d ' '`" = "1" ]; then
+ # Good. We have a package that meets the Slackware spec.
+ cat $TMP/$shortname >> $ADM_DIR/packages/$shortname
+else
+ # Some dumb bunny built a package with something other than
makepkg. Bad!
+ # Oh well. Bound to happen. Par for the course. Fix it and move on...
+ echo './' >> $ADM_DIR/packages/$shortname
+ cat $TMP/$shortname | grep -v '^./$' | cut -b3- >> $ADM_DIR/packages/$shortn
+ame
+fi
+
+if [ -f $ROOT/install/doinst.sh ]; then
+ echo "Executing install script for $shortname..."
+ (cd $ROOT; sh install/doinst.sh -install)
+ cp $ROOT/install/doinst.sh $ADM_DIR/scripts/$shortname
+ chmod 755 $ADM_DIR/scripts/$shortname
+fi
+
+# Clean up the mess...
+rm -f $TMP/$shortname
+rm -rf $ROOT/install
+exit 0
|