[svn] r6512 - in trunk/tools/dar: . dists/el2i dists/el3a dists/el3i dists/el4a dists/el4i dists/el5a dists/el5i dists/fc1i dists/fc2a dists/fc2i dists/fc3a dists/fc3i dists/fc4i dists/rh6i dists/rh7i dists/rh8i dists/rh9i

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Sun Oct 12 23:45:32 CEST 2008


Author: dag
Date: 2008-10-12 22:45:32 +0100 (Sun, 12 Oct 2008)
New Revision: 6512

Modified:
   trunk/tools/dar/dar-build
   trunk/tools/dar/dar-exec
   trunk/tools/dar/dar-list-perl.py
   trunk/tools/dar/dar-perl.py
   trunk/tools/dar/dar-prepare
   trunk/tools/dar/dar-shell
   trunk/tools/dar/dar-update
   trunk/tools/dar/dists/el2i/config
   trunk/tools/dar/dists/el3a/config
   trunk/tools/dar/dists/el3i/config
   trunk/tools/dar/dists/el4a/config
   trunk/tools/dar/dists/el4i/config
   trunk/tools/dar/dists/el5a/config
   trunk/tools/dar/dists/el5i/config
   trunk/tools/dar/dists/fc1i/config
   trunk/tools/dar/dists/fc2a/config
   trunk/tools/dar/dists/fc2i/config
   trunk/tools/dar/dists/fc3a/config
   trunk/tools/dar/dists/fc3i/config
   trunk/tools/dar/dists/fc4i/config
   trunk/tools/dar/dists/rh6i/config
   trunk/tools/dar/dists/rh7i/config
   trunk/tools/dar/dists/rh8i/config
   trunk/tools/dar/dists/rh9i/config
Log:
Improvements to DAR for RHEL5 and LD_ASSUME_KERNEL handling.

Modified: trunk/tools/dar/dar-build
===================================================================
--- trunk/tools/dar/dar-build	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-build	2008-10-12 21:45:32 UTC (rev 6512)
@@ -253,7 +253,7 @@
                 ln -sf $CHROOTDIR/$dist/root/.distcc/state /root/.distcc/
                 export DISTCC_LOG="$TEMPDIR/distcc-$LOGFILE"
                 rm -f "$DISTCC_LOG"
-                export MAKEFLAGS="-j$CPUNR CC=\"$DISTCC_CC\" CXX=\"$DISTCC_CXX\" GXX=\"$DISTCC_CXX\""
+                export MAKEFLAGS="-j$CPUNR CC='$DISTCC_CC' CXX='$DISTCC_CXX' GXX='$DISTCC_CXX'"
                 export DISTCC_HOSTS CC="$DISTCC_CC" CXX="$DISTCC_CXX" GXX="$DISTCC_CXX"
                 export PATH="/usr/lib/distcc/bin:$PATH"
             else
@@ -275,13 +275,6 @@
                 export CCACHE_RECACHE="1"
             fi
 
-            ### Check for Setarch
-            if [ -x "/usr/bin/setarch" -a "$DISTARCH" != "$(uname -m)" ]; then
-                SETARCH="/usr/bin/setarch $DISTARCH"
-            else
-                unset SETARCH
-            fi
-
             ### Disable ExtUtils::AutoInstall in perl packages
             export PERL_EXTUTILS_AUTOINSTALL="--skipdeps --skip"
 
@@ -290,9 +283,7 @@
 
             ### Prepare rpm options
             if [ "$FORCE_VERBOSE" ]; then
-                RPMBUILDOPTS="$RPMBUILDOPTS -vv --target $arch"
-            else
-                RPMBUILDOPTS="$RPMBUILDOPTS --target $arch"
+                RPMBUILDOPTS="$RPMBUILDOPTS -vv"
             fi
 
             if [ "$FORCE_VERBOSE" == "yes" ]; then
@@ -307,14 +298,15 @@
                 export LD_PRELOAD="/lib/libsoapbox.so"
             fi
 
-            BUILDCMD="/usr/bin/rpmbuild -bb --clean $RPMBUILDOPTS \
+            BUILDCMD="/usr/bin/rpmbuild -bb --clean $RPMBUILDOPTS --target $arch \
                     --define \"_smp_mflags $MAKEFLAGS\" \
                     --define \"_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\" \
                     --define \"_initrddir %{_sysconfdir}/rc.d/init.d\" \
                     --define \"_rpmdir $PACKAGEDIR/$app\" \
                     --define \"_sourcedir $SPECDIR\" \
-                    --define \"_builddir $BUILDDIR\" \
+                    --define \"_builddir $ROOT/build\" \
                     --define \"_tmppath $TEMPDIR\" \
+                    --define \"_buildroot $TEMPDIR/$app-$VERSION-$RELEASE-root\" \
                     --define \"debug_package %nil\" \
                     --define \"dtag $DISTNAME\" \
                     --define \"disttag $DISTNAME\" \
@@ -334,37 +326,10 @@
                 echo -e "\n----- Build log -----"
 
                 ### Check for building as user
-                if [ $AS_ROOT -eq 1 ]; then
-                    $SETARCH chroot "$CHROOTDIR/$dist" /usr/bin/rpmbuild -bb --clean $RPMBUILDOPTS \
-                        --define "_smp_mflags $MAKEFLAGS" \
-                        --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
-                        --define "_initrddir %{_sysconfdir}/rc.d/init.d" \
-                        --define "_rpmdir $PACKAGEDIR/$app" \
-                        --define "_sourcedir $SPECDIR" \
-                        --define "_builddir $ROOT/build" \
-                        --define "_buildroot $TEMPDIR/$app-$VERSION-$RELEASE-root" \
-                        --define "debug_package %nil" \
-                        --define "dtag $DISTNAME" \
-                        --define "disttag $DISTNAME" \
-                        --define "$DISTNAME 1" \
-                        --define "$DISTNICK 1" \
-                        "$NEWSPECFILE"
+                if [ $AS_ROOT -ne 1 ]; then
+                    echo "$BUILDCMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$dist" /bin/su -lm $BUILD_USER -c "/bin/bash --login -s"
                 else
-                    $SETARCH chroot "$CHROOTDIR/$dist" /bin/su -lm $BUILD_USER -c "/usr/bin/rpmbuild -bb --clean $RPMBUILDOPTS \
-                        --define '_smp_mflags $MAKEFLAGS' \
-                        --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
-                        --define '_initrddir %{_sysconfdir}/rc.d/init.d' \
-                        --define '_rpmdir $PACKAGEDIR/$app' \
-                        --define '_sourcedir $SPECDIR' \
-                        --define '_builddir $ROOT/build' \
-                        --define '_tmppath $TEMPDIR' \
-                        --define '_buildroot $TEMPDIR/$app-$VERSION-$RELEASE-root' \
-                        --define 'debug_package %nil' \
-                        --define 'dtag $DISTNAME' \
-                        --define 'disttag $DISTNAME' \
-                        --define '$DISTNAME 1' \
-                        --define '$DISTNICK 1' \
-                        $NEWSPECFILE"
+                    echo "$BUILDCMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$dist" /bin/bash --login -s
                 fi
 
             ) >>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO" 2>&1
@@ -460,15 +425,16 @@
             if [ "$FORCE_VERBOSE" == "yes" ]; then
                 echo "Building source package $app using \"$SPECFILE\" for $dist"
             fi
-            chroot "$CHROOTDIR/$dist" /usr/bin/rpmbuild -bs \
-                --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
-                --define "_srcrpmdir $PACKAGEDIR/$app" \
-                --define "_sourcedir $SPECDIR" \
-                --define "$dist 1" \
-                --define "dist $DISTNAME" \
-                --define "disttag $DISTNAME" \
-                --define "$DISTNAME 1" \
-                "$NEWSPECFILE" &>/dev/null
+            BUILDCMD="/usr/bin/rpmbuild -bs \
+                --define \"_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\" \
+                --define \"_srcrpmdir $PACKAGEDIR/$app\" \
+                --define \"_sourcedir $SPECDIR\" \
+                --define \"$dist 1\" \
+                --define \"dist $DISTNAME\" \
+                --define \"disttag $DISTNAME\" \
+                --define \"$DISTNAME 1\" \
+                \"$NEWSPECFILE\""
+            echo "$BUILDCMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$dist" /bin/su -lm $BUILD_USER -c "/bin/bash --login -s" &>/dev/null
             RC=$?
             if [ $RC -eq 0 ]; then
                 if [ "$FORCE_VERBOSE" == "yes" ]; then

Modified: trunk/tools/dar/dar-exec
===================================================================
--- trunk/tools/dar/dar-exec	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-exec	2008-10-12 21:45:32 UTC (rev 6512)
@@ -2,8 +2,8 @@
 source "/usr/share/dar/dar-functions"
 
 function help {
-	cat <<EOF
-usage: dar-exec [-q] [-d dist,dist2] cmd	
+    cat <<EOF
+usage: dar-exec [-q] [-d dist,dist2] cmd    
 Run a command in one or more DAR build environments
 
 dar-exec options:
@@ -32,8 +32,8 @@
 CMD=$@
 
 if [ ! -d "$ROOT" ]; then
-	echo "ERROR: probably in chroot jail" >&2
-	exit 1
+    echo "ERROR: probably in chroot jail" >&2
+    exit 1
 fi
 
 set_dists
@@ -41,39 +41,30 @@
 AS_ROOT=1
 
 for distname in $DISTS; do
-	if [ -z "$QUIET" ]; then
-		echo -e "$_BL_$_WH= Executing \"$_YE$CMD$_WH\" for $_YE$distname$_WH.$_DE"
-	fi
+    if [ -z "$QUIET" ]; then
+        echo -e "$_BL_$_WH= Executing \"$_YE$CMD$_WH\" for $_YE$distname$_WH.$_DE"
+    fi
 
-	if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
-		source "$CONFIGDIR/dists/$distname/config"
-		export arch="$DISTARCH" dist="${DISTNAME// *}" nick="$DISTNICK" path="$DISTPATH" repo="$REPO" tag="${DISTTAG// *}"
-	fi
+    if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
+        source "$CONFIGDIR/dists/$distname/config"
+        export arch="$DISTARCH" dist="${DISTNAME// *}" nick="$DISTNICK" path="$DISTPATH" repo="$REPO" tag="${DISTTAG// *}"
+    fi
 
-	### Check for building as user
-	if [ $AS_ROOT -eq 1 ]; then
-#		DO_SU="/bin/su -l -c"
-		if [ "$FORCE_VERBOSE" ]; then
-			DO_SU="/bin/bash -x -s"
-		else
-			DO_SU="/bin/bash -s"
-		fi
-	else
-		if [ "$FORCE_VERBOSE" ]; then
-			DO_SU="/bin/su -lm $BUILD_USER -- /bin/bash -x -s"
-		else
-			DO_SU="/bin/su -lm $BUILD_USER -- /bin/bash -s"
-		fi
-	fi
+    ### Check for building as user
+    if [ $AS_ROOT -eq 1 -a -z "$FORCE_VERBOSE" ]; then
+        echo "$CMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
+    elif [ $AS_ROOT -eq 1 -a "$FORCE_VERBOSE" ]; then
+        echo "$CMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
+    elif [ $AS_ROOT -ne 1 -a -z "$FORCE_VERBOSE" ]; then
+        echo "$CMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/su -lm $BUILD_USER -c "/bin/bash --login -s"
+    else
+        echo "$CMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/su -lm $BUILD_USER -c "/bin/bash --login -x -s"
+    fi
+    RC=$?
 
-#	echo chroot "$CHROOTDIR/$distname" $DO_SU $CMD
-#	chroot "$CHROOTDIR/$distname" $DO_SU $CMD
-	echo "$CMD" | chroot "$CHROOTDIR/$distname" $DO_SU
-	RC=$?
-
-	if [ $RC -ne 0 ]; then
-		error "$_RE_${_WH}Failed execution (RC=$_YE$RC$_WH)$_DE"
-	fi
+    if [ $RC -ne 0 ]; then
+        error "$_RE_${_WH}Failed execution (RC=$_YE$RC$_WH)$_DE"
+    fi
 done
 
 exit 0

Modified: trunk/tools/dar/dar-list-perl.py
===================================================================
--- trunk/tools/dar/dar-list-perl.py	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-list-perl.py	2008-10-12 21:45:32 UTC (rev 6512)
@@ -16,7 +16,7 @@
     filename = os.path.join(tmppath, os.path.basename(url))
     try:
         st = os.stat(filename)
-        if st and st.st_mtime + 1800 > time.time():
+        if st and st.st_mtime + 3600 > time.time():
 #            print >>sys.stderr, "File %s is recent, skip download." % os.path.basename(url)
             return True
     except:

Modified: trunk/tools/dar/dar-perl.py
===================================================================
--- trunk/tools/dar/dar-perl.py	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-perl.py	2008-10-12 21:45:32 UTC (rev 6512)
@@ -79,7 +79,7 @@
     filename = os.path.join(tmppath, os.path.basename(url))
     try:
         st = os.stat(filename)
-        if st and st.st_mtime + 1800.0 > time.time():
+        if st and st.st_mtime + 3600.0 > time.time():
 #            print >>sys.stderr, "File %s is recent, skip download." % os.path.basename(url)
             return True
     except:

Modified: trunk/tools/dar/dar-prepare
===================================================================
--- trunk/tools/dar/dar-prepare	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-prepare	2008-10-12 21:45:32 UTC (rev 6512)
@@ -3,38 +3,38 @@
 source "/usr/share/dar/dar-functions"
 
 if [ -z "$DEFAULT_DISTS" -o -z "$ROOT" ]; then
-	echo "ERROR: There's something wrong with your configuration !" >&2
-	exit 1
+    echo "ERROR: There's something wrong with your configuration !" >&2
+    exit 1
 fi
 
 umount /dar/build 2>/dev/null
-mount -o bind /dev/shm /dar/build/
+#mount -o bind /dev/shm /dar/build/
 
 for distname in $DEFAULT_DISTS; do
-	if [ "${DEFAULT_DISTS// */}" != $distname ]; then
-		ln -f $CHROOTDIR/${DEFAULT_DISTS// */}/root/.bash_history $CHROOTDIR/$distname/root/.bash_history
-	fi
+    if [ "${DEFAULT_DISTS// */}" != $distname ]; then
+        ln -f $CHROOTDIR/${DEFAULT_DISTS// */}/root/.bash_history $CHROOTDIR/$distname/root/.bash_history
+    fi
 
-	umount $CHROOTDIR/$distname{/dev/pts,/proc,/sys,/tmp,$ROOT/build,$ROOT/} 2>/dev/null
+    umount $CHROOTDIR/$distname{/dev/pts,/proc,/sys,/tmp,$ROOT/build,$ROOT/} 2>/dev/null
 
-#	rm -rf $CHROOTDIR/$distname{$RPMTMPPATH}/*
-	mkdir -p $CHROOTDIR/$distname/$ROOT/
-	mount -o bind $ROOT $CHROOTDIR/$distname/$ROOT/
+#   rm -rf $CHROOTDIR/$distname{$RPMTMPPATH}/*
+    mkdir -p $CHROOTDIR/$distname/$ROOT/
+    mount -o bind $ROOT $CHROOTDIR/$distname/$ROOT/
 
-	mkdir -p $CHROOTDIR/$distname/proc/
-	mount -t proc proc $CHROOTDIR/$distname/proc/
+    mkdir -p $CHROOTDIR/$distname/proc/
+    mount -t proc proc $CHROOTDIR/$distname/proc/
 
-	mkdir -p $CHROOTDIR/$distname/sys/
-	mount -t sysfs sys $CHROOTDIR/$distname/sys/
+    mkdir -p $CHROOTDIR/$distname/sys/
+    mount -t sysfs sys $CHROOTDIR/$distname/sys/
 
-	mkdir -p $CHROOTDIR/$distname/dev/pts/
-	mount -t devpts devpts $CHROOTDIR/$distname/dev/pts/
+    mkdir -p $CHROOTDIR/$distname/dev/pts/
+    mount -t devpts devpts $CHROOTDIR/$distname/dev/pts/
 
-###	Use this when you want to speed up building :)
-	mkdir -p $CHROOTDIR/$distname/$ROOT/build/
-	mount -o bind /dev/shm $CHROOTDIR/$distname$ROOT/build/
+### Use this when you want to speed up building :)
+#    mkdir -p $CHROOTDIR/$distname/$ROOT/build/
+#    mount -o bind /dev/shm $CHROOTDIR/$distname$ROOT/build/
 
-###	Use thise when using X processes inside chroots
-	mkdir -p $CHROOTDIR/$distname/tmp/
-	mount -o bind /tmp/ $CHROOTDIR/$distname/tmp/
+### Use thise when using X processes inside chroots
+#    mkdir -p $CHROOTDIR/$distname/tmp/
+#    mount -o bind /tmp/ $CHROOTDIR/$distname/tmp/
 done

Modified: trunk/tools/dar/dar-shell
===================================================================
--- trunk/tools/dar/dar-shell	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-shell	2008-10-12 21:45:32 UTC (rev 6512)
@@ -2,8 +2,8 @@
 source "/usr/share/dar/dar-functions"
 
 function help {
-	cat <<EOF
-usage: dar-shell [-q] [-d dist,dist2] cmd     
+    cat <<EOF
+usage: dar-shell [-q] [-v] [-d dist,dist2] cmd
 Acquire a shell in one or more DAR build environments
 
 dar-exec options:
@@ -11,6 +11,7 @@
   -d dist,dist2         select build envs
   -h                    this help message
   -q                    be very quiet
+  -v                    more verbose
 
 exported variables:
 
@@ -20,12 +21,12 @@
 exit 1
 }
 
-daropts "d:hq" $@
+daropts "d:hqv" $@
 CMD="$OPTS"
 
 if [ ! -d "$ROOT" ]; then
-	echo "ERROR: probably in chroot jail" >&2
-	exit 1
+    echo "ERROR: probably in chroot jail" >&2
+    exit 1
 fi
 
 set_dists
@@ -33,19 +34,23 @@
 AS_ROOT=1
 
 if [ -z "$QUIET" ]; then
-	echo -e "$_BL_$_WH= Entering shells.$_DE"
+    echo -e "$_BL_$_WH= Entering shells.$_DE"
 fi
 for distname in $DISTS; do
-	if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
-		source "$CONFIGDIR/dists/$distname/config"
-		export arch="$DISTARCH" dist="${DISTNAME// *}" nick="$DISTNICK" path="$DISTPATH" repo="$REPO" tag="${DISTTAG// *}"
-	fi
+    if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
+        source "$CONFIGDIR/dists/$distname/config"
+        export arch="$DISTARCH" dist="${DISTNAME// *}" nick="$DISTNICK" path="$DISTPATH" repo="$REPO" tag="${DISTTAG// *}"
+    fi
 
-	setarch $DISTARCH chroot $CHROOTDIR/$distname
+    if [ -z "$FORCE_VERBOSE" ]; then
+        setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login
+    else
+        setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x
+    fi
 done
 if [ -z "$QUIET" ]; then
-	echo -en "$_BL_$_WH= Returning to parent shell. Press ENTER.$_DE"
-	read a
+    echo -en "$_BL_$_WH= Returning to parent shell. Press ENTER.$_DE"
+    read a
 fi
 
 exit 0

Modified: trunk/tools/dar/dar-update
===================================================================
--- trunk/tools/dar/dar-update	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dar-update	2008-10-12 21:45:32 UTC (rev 6512)
@@ -12,40 +12,49 @@
 
 ### Update build environment
 for distname in $DISTS; do
-	echo "Updating $distname."
-        if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
-                source "$CONFIGDIR/dists/$distname/config"
+    echo "Updating $distname."
+    if [ -r "$CONFIGDIR/dists/$distname/config" ]; then
+        source "$CONFIGDIR/dists/$distname/config"
+    else
+        warning "Configfile $CONFIGDIR/dists/$distname/config missing. Aborting."
+        continue
+    fi
+
+    if [ "$CREATE_REPO" ]; then
+        echo "Building $distname repository in $DISTPATH."
+        build_tree_apt "$DISTNAME $DISTTAG" "$DISTPATH"
+        build_repo_apt "$DISTPATH"
+#       build_repo_yum "$DISTTAG" "$DISTPATH"
+    fi
+
+    if [ "$UPDATECMD" ]; then
+        if [ -z "$FORCE_VERBOSE" ]; then
+            echo "$UPDATECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
         else
-                warning "Configfile $CONFIGDIR/dists/$distname/config missing. Aborting."
-                continue
+            echo "$UPDATECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
         fi
+    fi
 
-	if [ "$CREATE_REPO" ]; then
-		echo "Building $distname repository in $DISTPATH."
-		build_tree_apt "$DISTNAME $DISTTAG" "$DISTPATH"
-		build_repo_apt "$DISTPATH"
-#		build_repo_yum "$DISTTAG" "$DISTPATH"
-	fi
+    if [ -z "$PKGS" -a "$UPGRADECMD" ]; then
+        if [ -z "$FORCE_VERBOSE" ]; then
+            echo "$UPGRADECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
+        else
+            echo "$UPGRADECMD" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
+        fi
+    fi
 
-	if [ "$UPDATECMD" ]; then
-		chroot $CHROOTDIR/$distname $UPDATECMD
-	fi
-
-	if [ -z "$PKGS" -a "$UPGRADECMD" ]; then
-		chroot $CHROOTDIR/$distname $UPGRADECMD
-	fi
-
-	if [ "$INSTALLCMD" -a "$PKGS" ]; then
-		if echo "$INSTALLCMD" | grep -q '%p'; then
-			for pkg in $PKGS; do
-				instcmd="$(echo $INSTALLCMD | sed -e "s|%p|$pkg|g")"
-				echo "Installing $pkg in $distname."
-				chroot $CHROOTDIR/$distname $instcmd
-			done
-		else
-			echo $PKGS | xargs chroot $CHROOTDIR/$distname $INSTALLCMD
-		fi
-	fi
-	echo
+    if [ "$INSTALLCMD" -a "$PKGS" ]; then
+        for pkg in $PKGS; do
+            instcmd="$(echo $INSTALLCMD | sed -e "s|%p|$pkg|g")"
+            echo "Installing $pkg in $distname."
+            chroot $CHROOTDIR/$distname $instcmd
+            if [ -z "$FORCE_VERBOSE" ]; then
+                echo "$instcmd" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -s
+            else
+                echo "$instcmd" | setarch $DISTARCH /usr/sbin/chroot "$CHROOTDIR/$distname" /bin/bash --login -x -s
+            fi
+        done
+    fi
+    echo
 done
 echo "Finished."

Modified: trunk/tools/dar/dists/el2i/config
===================================================================
--- trunk/tools/dar/dists/el2i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el2i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -25,4 +25,4 @@
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
 
-export LD_ASSUME_KERNEL="2.4.1"
+ASSUME_KERNEL="2.4.1"

Modified: trunk/tools/dar/dists/el3a/config
===================================================================
--- trunk/tools/dar/dists/el3a/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el3a/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/el3i/config
===================================================================
--- trunk/tools/dar/dists/el3i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el3i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/el4a/config
===================================================================
--- trunk/tools/dar/dists/el4a/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el4a/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/el4i/config
===================================================================
--- trunk/tools/dar/dists/el4i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el4i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/el5a/config
===================================================================
--- trunk/tools/dar/dists/el5a/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el5a/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/el5i/config
===================================================================
--- trunk/tools/dar/dists/el5i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/el5i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc1i/config
===================================================================
--- trunk/tools/dar/dists/fc1i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc1i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -21,5 +21,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc2a/config
===================================================================
--- trunk/tools/dar/dists/fc2a/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc2a/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,5 +24,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc2i/config
===================================================================
--- trunk/tools/dar/dists/fc2i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc2i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -21,5 +21,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc3a/config
===================================================================
--- trunk/tools/dar/dists/fc3a/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc3a/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -21,5 +21,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc3i/config
===================================================================
--- trunk/tools/dar/dists/fc3i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc3i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -21,5 +21,3 @@
 REPO_APT="yes"
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/fc4i/config
===================================================================
--- trunk/tools/dar/dists/fc4i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/fc4i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -23,5 +23,3 @@
 REPO_APT="yes"
 REPO_YUM="no"
 REPO_CREATEREPO="yes"
-
-export -n LD_ASSUME_KERNEL

Modified: trunk/tools/dar/dists/rh6i/config
===================================================================
--- trunk/tools/dar/dists/rh6i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/rh6i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -22,4 +22,4 @@
 REPO_YUM="no"
 REPO_CREATEREPO="yes"
 
-export LD_ASSUME_KERNEL="2.4.1"
+ASSUME_KERNEL="2.4.1"

Modified: trunk/tools/dar/dists/rh7i/config
===================================================================
--- trunk/tools/dar/dists/rh7i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/rh7i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -22,4 +22,4 @@
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
 
-export LD_ASSUME_KERNEL="2.4.1"
+ASSUME_KERNEL="2.4.1"

Modified: trunk/tools/dar/dists/rh8i/config
===================================================================
--- trunk/tools/dar/dists/rh8i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/rh8i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -22,4 +22,4 @@
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
 
-export LD_ASSUME_KERNEL="2.4.1"
+ASSUME_KERNEL="2.4.1"

Modified: trunk/tools/dar/dists/rh9i/config
===================================================================
--- trunk/tools/dar/dists/rh9i/config	2008-10-12 11:18:10 UTC (rev 6511)
+++ trunk/tools/dar/dists/rh9i/config	2008-10-12 21:45:32 UTC (rev 6512)
@@ -24,4 +24,4 @@
 REPO_YUM="yes"
 REPO_CREATEREPO="yes"
 
-export LD_ASSUME_KERNEL="2.4.1"
+ASSUME_KERNEL="2.4.1"




More information about the commits mailing list