[svn] r6307 - trunk/tools/dar

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Fri May 9 22:59:58 CEST 2008


Author: dag
Date: 2008-05-09 21:59:58 +0100 (Fri, 09 May 2008)
New Revision: 6307

Modified:
   trunk/tools/dar/commands.txt
   trunk/tools/dar/dar-build
   trunk/tools/dar/dar-functions
   trunk/tools/dar/dar-perl.py
   trunk/tools/dar/dar.conf
Log:
Updates

Modified: trunk/tools/dar/commands.txt
===================================================================
--- trunk/tools/dar/commands.txt	2008-05-09 19:56:13 UTC (rev 6306)
+++ trunk/tools/dar/commands.txt	2008-05-09 20:59:58 UTC (rev 6307)
@@ -13,7 +13,10 @@
 ### Clean up chroots
 #dar-exec
 
+### Update perl packages in RPMforge
+for pkg in $(/dar/tools/dar/dar-list-perl.py --new | cut -d' ' -f1); do /dar/tools/dar/dar-diff-perl.sh $pkg; done
 
+
 ### INSTALLING
 ### """"""""""
 

Modified: trunk/tools/dar/dar-build
===================================================================
--- trunk/tools/dar/dar-build	2008-05-09 19:56:13 UTC (rev 6306)
+++ trunk/tools/dar/dar-build	2008-05-09 20:59:58 UTC (rev 6307)
@@ -8,468 +8,478 @@
 PKGS="$OPTS"
 
 if [ ! -d "$ROOT" ]; then
-	echo "ERROR: probably in chroot jail" >&2
-	exit 1
+    echo "ERROR: probably in chroot jail" >&2
+    exit 1
 fi
 
 ### Clear important build variables
 export -n CC_FLAGS CXX_FLAGS LD_PRELOAD LINGUAS
 
 for arg in $PKGS; do
-	DARBUILDRC=1
+    DARBUILDRC=1
 
-	SPECDIR="$(dirname $arg)"
-	app="$(basename $arg .spec)"
-	SPECFILE="$PWD/$app.spec"
+    SPECDIR="$(dirname $arg)"
+    app="$(basename $arg .spec)"
+    SPECFILE="$PWD/$app.spec"
 
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECDIR/$app.spec"; fi
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$app.spec"; fi
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$PWD/$app/$app.spec"; fi
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECDIR/$app/$app.spec"; fi
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$app/$app.spec"; fi
-	if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$SPECDIR/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECDIR/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$PWD/$app/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECDIR/$app/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$app/$app.spec"; fi
+    if [ ! -f "$SPECFILE" ]; then SPECFILE="$SPECSDIR/$SPECDIR/$app.spec"; fi
 
-	if [ "${SPECFILE:0:1}" != "/" ]; then SPECFILE="$PWD/$SPECFILE"; fi
+    if [ "${SPECFILE:0:1}" != "/" ]; then SPECFILE="$PWD/$SPECFILE"; fi
 
-	SPECDIR="$(dirname $SPECFILE)"
-	SPECFILE="$SPECDIR/$app.spec"
+    SPECDIR="$(dirname $SPECFILE)"
+    SPECFILE="$SPECDIR/$app.spec"
 
-	if [ ! -f "$SPECFILE" ]; then 
-		echo "ERROR: specfile \"$(basename $SPECFILE)\" is not found."
-		continue
-	fi
+    if [ ! -f "$SPECFILE" ]; then 
+        echo "ERROR: specfile \"$(basename $SPECFILE)\" is not found."
+        continue
+    fi
 
-	if [ ! -d "$SPECDIR" ]; then 
-		echo "ERROR: specdir \"$SPECDIR\" is not found."
-		continue
-	fi
+    if [ ! -d "$SPECDIR" ]; then 
+        echo "ERROR: specdir \"$SPECDIR\" is not found."
+        continue
+    fi
 
-#	if [ -d "$SPECDIR/.svn/" ]; then
-#		svn -q up "$SPECDIR/"
-#	fi
+#   if [ -d "$SPECDIR/.svn/" ]; then
+#       svn -q up "$SPECDIR/"
+#   fi
 
-	### Export to rpmconf
-	export RVERSION="$(rpmmacro real_version)"
-	export RRELEASE="$(rpmmacro real_release)"
+    ### Export to rpmconf
+    export RVERSION="$(rpmmacro real_version)"
+    export RRELEASE="$(rpmmacro real_release)"
 
-	app="$(rpmconf Name)"
-	VERSION="$(rpmconf Version)"
-	RELEASE="$(rpmconf Release)"
+    app="$(rpmconf Name)"
+    VERSION="$(rpmconf Version)"
+    RELEASE="$(rpmconf Release)"
 
-	if [ -z "$app" ]; then
-		error "Problem with specfile \"$SPECFILE\". (Name is empty)"
-		continue
-	fi
+    if [ -z "$app" ]; then
+        error "Problem with specfile \"$SPECFILE\". (Name is empty)"
+        continue
+    fi
 
-	if [ -z "$VERSION" ]; then
-		VERSION="vs"
-#		die "Problem with specfile \"$SPECFILE\". (Version is empty)"
-	fi
+    if [ -z "$VERSION" ]; then
+        VERSION="vs"
+#       die "Problem with specfile \"$SPECFILE\". (Version is empty)"
+    fi
 
-	mkdir -p "$PACKAGEDIR/$app/_buildlogs/" "$SPECDIR/"
-	ln -sf "$PACKAGEDIR/$app/_buildlogs/" "$SPECDIR/"
-	chown -R $BUILD_USER.$BUILD_GROUP "$PACKAGEDIR/$app/"
-	chown -R $BUILD_USER.$BUILD_GROUP "$SPECDIR/"
-	chmod -R a+r "$SPECDIR/"
+    mkdir -p "$PACKAGEDIR/$app/_buildlogs/" "$SPECDIR/"
+    ln -sf "$PACKAGEDIR/$app/_buildlogs/" "$SPECDIR/"
+    chown -R $BUILD_USER.$BUILD_GROUP "$PACKAGEDIR/$app/"
+    chown -R $BUILD_USER.$BUILD_GROUP "$SPECDIR/"
+    chmod -R a+r "$SPECDIR/"
 
-	set_tag
-	set_dists
-	set_exclude_dist
-	set_exclusive_dist
-	set_source_dists
-	set_soapbox
-	set_as_root
-	set_ccache
-	set_distcc
+    set_tag
+    set_dists
+    set_exclude_dist
+    set_exclusive_dist
+    set_source_dists
+    set_soapbox
+    set_as_root
+    set_ccache
+    set_distcc
 
-	if ! download_sources; then
-		continue
-	fi
+    if ! download_sources; then
+        continue
+    fi
 
-#	echo "Building $app package for dists: '$DISTS' and archs: '$ARCHS', tagged: '$TAG'"
-	for dist in $DISTS; do
-		RPMBUILDOPTS=""
-		if [ -r "$CONFIGDIR/dists/$dist/config" ]; then
-			source "$CONFIGDIR/dists/$dist/config"
-		else
-			warning "Configfile $CONFIGDIR/dists/$dist/config missing. Aborting."
-			continue
-		fi
+#   echo "Building $app package for dists: '$DISTS' and archs: '$ARCHS', tagged: '$TAG'"
+    for dist in $DISTS; do
+        RPMBUILDOPTS=""
+        if [ -r "$CONFIGDIR/dists/$dist/config" ]; then
+            source "$CONFIGDIR/dists/$dist/config"
+        else
+            warning "Configfile $CONFIGDIR/dists/$dist/config missing. Aborting."
+            continue
+        fi
 
-		if [ "$NODIST" ]; then
-			DISTTAG="0"
-			DISTNAME="nodist"
-#			ARCHS="noarch"
-		fi
+        if [ "$NODIST" ]; then
+            DISTTAG="0"
+            DISTNAME="nodist"
+#           ARCHS="noarch"
+        fi
 
 
-		if [ ! -d "$CHROOTDIR/$DISTNICK" ]; then
-			warning "Distribution $DISTNICK has no build environment ($CHROOTDIR/$DISTNICK). Aborting."
-			continue
-		fi
+        if [ ! -d "$CHROOTDIR/$DISTNICK" ]; then
+            warning "Distribution $DISTNICK has no build environment ($CHROOTDIR/$DISTNICK). Aborting."
+            continue
+        fi
 
-		for exclude_dist in $EXCLUDE_DIST; do
-			if [ "$exclude_dist" == "$DISTNAME" -o "$exclude_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
-				warning "Distribution $DISTNAME/$DISTARCH is excluded for package $app. Aborting."
-				continue 2
-			fi
-		done
+        for exclude_dist in $EXCLUDE_DIST; do
+            if [ "$exclude_dist" == "$DISTNAME" -o "$exclude_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
+                warning "Distribution $DISTNAME/$DISTARCH is excluded for package $app. Aborting."
+                continue 2
+            fi
+        done
 
-		if [ "$EXCLUSIVE_DIST" ]; then
-			EXCLUSIVE=0
-			for exclusive_dist in $EXCLUSIVE_DIST; do
-				if [ "$exclusive_dist" == "$DISTNAME" -o "$exclusive_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
-					EXCLUSIVE=1
-				fi
-			done
-			if [ $EXCLUSIVE -ne 1 ]; then
-				warning "Distribution $DISTNAME/$DISTARCH is excluded for package $app. Aborting."
-				continue
-			fi
-		fi
+        if [ "$EXCLUSIVE_DIST" ]; then
+            EXCLUSIVE=0
+            for exclusive_dist in $EXCLUSIVE_DIST; do
+                if [ "$exclusive_dist" == "$DISTNAME" -o "$exclusive_dist" == "$DISTNICK" -o "$DISTNAME" == "nodist" ]; then
+                    EXCLUSIVE=1
+                fi
+            done
+            if [ $EXCLUSIVE -ne 1 ]; then
+                warning "Distribution $DISTNAME/$DISTARCH is excluded for package $app. Aborting."
+                continue
+            fi
+        fi
 
-		### Cleaning up nodebug shit
-#		perl -pi -e 's|-O2 -g|-O2|' $CHROOTDIR/$DISTNICK/usr/lib/rpm/{macros,*/macros,rpmrc}
+        ### Cleaning up nodebug shit
+#       perl -pi -e 's|-O2 -g|-O2|' $CHROOTDIR/$DISTNICK/usr/lib/rpm/{macros,*/macros,rpmrc}
 
-		### Export RPMVER to rpmconf
-		export RPMVER="$(chroot $CHROOTDIR/$DISTNICK /bin/su -lm $BUILD_USER -c "rpm --version" | cut -d' ' -f3)"
+        ### Export RPMVER to rpmconf
+        export RPMVER="$(chroot $CHROOTDIR/$DISTNICK /bin/su -lm $BUILD_USER -c "rpm --version" | cut -d' ' -f3)"
 
-		set_archs
+        set_archs
 
-		### TODO: Check if etc/rpm/macros exists with proper content
+        ### TODO: Check if etc/rpm/macros exists with proper content
 
-		for arch in $ARCHS; do
-			VERSION="$(rpmconf Version)"
-			RELEASE="$(rpmconf Release)"
+        for arch in $ARCHS; do
+            VERSION="$(rpmconf Version)"
+            RELEASE="$(rpmconf Release)"
 
-			NEWSPECFILE="$TEMPDIR/$app-$VERSION-$RELEASE.$TAG.spec"
-			RPMFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.rpm"
-			LOGFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.log"
-			export MAKEFLAGS="%nil"
+            NEWSPECFILE="$TEMPDIR/$app-$VERSION-$RELEASE.$TAG.spec"
+            RPMFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.rpm"
+            LOGFILE="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch"
+            LOGFILE_OK="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.ok.log"
+            LOGFILE_KO="$app-$VERSION-$RELEASE.$DISTNAME.$TAG.$arch.ko.log"
+            export MAKEFLAGS="%nil"
 
-			if [ "$arch" == "nosrc" ]; then
-				DARBUILDRC=0
-				break
-			fi
+            if [ "$arch" == "nosrc" ]; then
+                DARBUILDRC=0
+                break
+            fi
 
-			### Check if already build (2 version schemes, multiple disttags)
-			for disttag in $DISTNAME $DISTTAG; do
-				for tag in $TAGS; do
-					NEWRPMFILE="$app-$VERSION-$RELEASE.$disttag.$tag.$arch.rpm"
-					OLDRPMFILE="$app-$VERSION-$RELEASE.$tag.$disttag.$arch.rpm"
-					for rpmfile in $NEWRPMFILE $OLDRPMFILE; do
-#						echo $rpmfile
-						if [ -z "$FORCE_OVERWRITE" -a -f "$PACKAGEDIR/$app/$rpmfile" ]; then
-							warning "Package \"$PACKAGEDIR/$app/$rpmfile\" already exists."
-			
-#							if [ -z "$SOURCE_DISTS" ]; then
-#								SOURCE_DISTS="$DISTNICK"
-#							fi
-			
-							continue 4
-						fi
-					done
-				done
-			done
+            ### Check if already build (2 version schemes, multiple disttags)
+            for disttag in $DISTNAME $DISTTAG; do
+                for tag in $TAGS; do
+                    NEWRPMFILE="$app-$VERSION-$RELEASE.$disttag.$tag.$arch.rpm"
+                    OLDRPMFILE="$app-$VERSION-$RELEASE.$tag.$disttag.$arch.rpm"
+                    for rpmfile in $NEWRPMFILE $OLDRPMFILE; do
+#                       echo $rpmfile
+                        if [ -z "$FORCE_OVERWRITE" -a -f "$PACKAGEDIR/$app/$rpmfile" ]; then
+                            warning "Package \"$PACKAGEDIR/$app/$rpmfile\" already exists."
+            
+#                           if [ -z "$SOURCE_DISTS" ]; then
+#                               SOURCE_DISTS="$DISTNICK"
+#                           fi
+            
+                            continue 4
+                        fi
+                    done
+                done
+            done
 
-			cp -af "$SPECFILE" "$NEWSPECFILE"
+            cp -af "$SPECFILE" "$NEWSPECFILE"
 
-			export origspecfile="$SPECFILE" specfile="$NEWSPECFILE" builddir="$BUILDDIR" chrootdir="$CHROOTDIR/$dist"
-			export app buildarch="$arch" distarch="$DISTARCH" disttag="$DISTNAME" repotag="$TAG" release="$RELEASE"
-			export force="$FORCE_OVERWRITE"
-			for script in $CONFIGDIR/scripts/pre-*.sh; do
-				source "$script"
-			done
+            export origspecfile="$SPECFILE" specfile="$NEWSPECFILE" builddir="$BUILDDIR" chrootdir="$CHROOTDIR/$dist"
+            export app buildarch="$arch" distarch="$DISTARCH" disttag="$DISTNAME" repotag="$TAG" release="$RELEASE"
+            export force="$FORCE_OVERWRITE"
+            for script in $CONFIGDIR/scripts/pre-*.sh; do
+                source "$script"
+            done
 
-			### Start logging
-			rm -f "$PACKAGEDIR/$app/$LOGFILE"
-			(	echo "----- Build information -----"
-				echo "Package name: $app"
-				echo "Package version: $VERSION"
-				echo "Package release: $RELEASE.$DISTNAME.$TAG"
-				echo "Packager: $(logname)"
-				echo "Distribution: $DISTNAME/$DISTARCH"
-				echo "Package arch: $arch"
-				echo "Build host: $(uname -n)"
-				echo "Build date: $(date)"
+            ### Start logging
+#            rm -f "$PACKAGEDIR/$app/$LOGFILE"
+            (   echo "----- Build information -----"
+                echo "Package name: $app"
+                echo "Package version: $VERSION"
+                echo "Package release: $RELEASE.$DISTNAME.$TAG"
+                echo "Packager: $(logname)"
+                echo "Distribution: $DISTNAME/$DISTARCH"
+                echo "Package arch: $arch"
+                echo "Build host: $(uname -n)"
+                echo "Build date: $(date)"
 
-				if [ $SOAPBOX -eq 1 -a -f "/lib/libsoapbox.so" -a -f "$CHROOTDIR/$dist/lib/libsoapbox.so" ]; then
-					echo "Soapbox: enabled"
-				else
-					echo "Soapbox: disabled"
-				fi
+                if [ $SOAPBOX -eq 1 -a -f "/lib/libsoapbox.so" -a -f "$CHROOTDIR/$dist/lib/libsoapbox.so" ]; then
+                    echo "Soapbox: enabled"
+                else
+                    echo "Soapbox: disabled"
+                fi
 
-				if [ $AS_ROOT -eq 1 ]; then
-					echo "BuildAsRoot: enabled (root)"
-					export HOME="/root"
-					export USER="root"
-				else
-					echo "BuildAsRoot: disabled ($BUILD_USER)"
-					export HOME="/home/$BUILD_USER"
-					export USER="$BUILD_USER"
-				fi
+                if [ $AS_ROOT -eq 1 ]; then
+                    echo "BuildAsRoot: enabled (root)"
+                    export HOME="/root"
+                    export USER="root"
+                else
+                    echo "BuildAsRoot: disabled ($BUILD_USER)"
+                    export HOME="/home/$BUILD_USER"
+                    export USER="$BUILD_USER"
+                fi
 
-				if [ $USE_DISTCC -ne 0 -a $DISTCC -eq 1 -a -n "$DISTCC_HOSTS" -a -x "$CHROOTDIR/$dist/usr/bin/distcc" -a -d "$CHROOTDIR/$dist/usr/lib/distcc/bin" ]; then
-					echo "Distcc: enabled"
-					echo "Distcc hosts: $DISTCC_HOSTS"
-				else
-					echo "Distcc: disabled"
-				fi
+                if [ $USE_DISTCC -ne 0 -a $DISTCC -eq 1 -a -n "$DISTCC_HOSTS" -a -x "$CHROOTDIR/$dist/usr/bin/distcc" -a -d "$CHROOTDIR/$dist/usr/lib/distcc/bin" ]; then
+                    echo "Distcc: enabled"
+                    echo "Distcc hosts: $DISTCC_HOSTS"
+                else
+                    echo "Distcc: disabled"
+                fi
 
-				if [ $USE_CCACHE -ne 0 -a $CCACHE -eq 1 -a -x "$CHROOTDIR/$dist/usr/bin/ccache" -a -d "$CHROOTDIR/$dist/usr/lib/ccache/bin" ]; then
-					echo "Ccache: enabled"
-				else
-					echo "Ccache: disabled"
-				fi
+                if [ $USE_CCACHE -ne 0 -a $CCACHE -eq 1 -a -x "$CHROOTDIR/$dist/usr/bin/ccache" -a -d "$CHROOTDIR/$dist/usr/lib/ccache/bin" ]; then
+                    echo "Ccache: enabled"
+                else
+                    echo "Ccache: disabled"
+                fi
 
-			) &>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE"
+            ) &>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO"
 
-			### Backup PATH
-			OLDPATH="$PATH"
+            ### Backup PATH
+            OLDPATH="$PATH"
 
-			### Check for Distcc
-			if [ $USE_DISTCC -ne 0 -a $DISTCC -eq 1 -a -n "$DISTCC_HOSTS" -a -x "$CHROOTDIR/$dist/usr/bin/distcc" -a -d "$CHROOTDIR/$dist/usr/lib/distcc/bin" ]; then
-				if [ -z "$CPUNR" ]; then
-					CPUNR="$(( $(echo $DISTCC_HOSTS | wc -w) * 2 ))"
-				fi
-				if [ "$FORCE_VERBOSE" ]; then
-					export DISTCC_VERBOSE="1"
-				fi
-				if [ -d /root/.distcc/state/ ]; then
-					rmdir /root/.distcc/state/ &>/dev/null
-				fi
-				if [ $USE_ROOT -ne 1 -o $AS_ROOT -ne 1 ]; then
-					chown $BUILD_USER.$BUILD_USER $CHROOTDIR/$dist/root/.distcc/
-#					ln -sf $CHROOTDIR/$dist/home/$BUILD_USER/.distcc/state /root/.distcc/
-#				else
-#					ln -sf $CHROOTDIR/$dist/root/.distcc/state /root/.distcc/
-				fi
-				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 DISTCC_HOSTS CC="$DISTCC_CC" CXX="$DISTCC_CXX" GXX="$DISTCC_CXX"
-				export PATH="/usr/lib/distcc/bin:$PATH"
-			else
-				if [ "$CPUNR" -a $CPUNR -ne 0 -a $CPUNR -ne 1 ]; then
-					export MAKEFLAGS="-j$CPUNR"
-				else
-					export MAKEFLAGS="-j1"
-				fi
-				export -n DISTCC_HOSTS CC CXX GXX
-			fi
+            ### Check for Distcc
+            if [ $USE_DISTCC -ne 0 -a $DISTCC -eq 1 -a -n "$DISTCC_HOSTS" -a -x "$CHROOTDIR/$dist/usr/bin/distcc" -a -d "$CHROOTDIR/$dist/usr/lib/distcc/bin" ]; then
+                if [ -z "$CPUNR" ]; then
+                    CPUNR="$(( $(echo $DISTCC_HOSTS | wc -w) * 2 ))"
+                fi
+                if [ "$FORCE_VERBOSE" ]; then
+                    export DISTCC_VERBOSE="1"
+                fi
+                if [ -d /root/.distcc/state/ ]; then
+                    rmdir /root/.distcc/state/ &>/dev/null
+                fi
+                if [ $USE_ROOT -ne 1 -o $AS_ROOT -ne 1 ]; then
+                    chown $BUILD_USER.$BUILD_USER $CHROOTDIR/$dist/root/.distcc/
+#                   ln -sf $CHROOTDIR/$dist/home/$BUILD_USER/.distcc/state /root/.distcc/
+#               else
+#                   ln -sf $CHROOTDIR/$dist/root/.distcc/state /root/.distcc/
+                fi
+                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 DISTCC_HOSTS CC="$DISTCC_CC" CXX="$DISTCC_CXX" GXX="$DISTCC_CXX"
+                export PATH="/usr/lib/distcc/bin:$PATH"
+            else
+                if [ "$CPUNR" -a $CPUNR -ne 0 -a $CPUNR -ne 1 ]; then
+                    export MAKEFLAGS="-j$CPUNR"
+                else
+                    export MAKEFLAGS="-j1"
+                fi
+                export -n DISTCC_HOSTS CC CXX GXX
+            fi
 
-			### Check for Ccache
-			if [ $USE_CCACHE -ne 0 -a $CCACHE -eq 1 -a -x "$CHROOTDIR/$dist/usr/bin/ccache" -a -d "$CHROOTDIR/$dist/usr/lib/ccache/bin" ]; then
-				export CCACHE_DIR="$TEMPDIR/ccache-$dist"
-				export -n CCACHE_RECACHE
-				export PATH="/usr/lib/ccache/bin:$PATH"
-				mkdir -p "$CCACHE_DIR"
-			else
-				export CCACHE_RECACHE="1"
-			fi
+            ### Check for Ccache
+            if [ $USE_CCACHE -ne 0 -a $CCACHE -eq 1 -a -x "$CHROOTDIR/$dist/usr/bin/ccache" -a -d "$CHROOTDIR/$dist/usr/lib/ccache/bin" ]; then
+                export CCACHE_DIR="$TEMPDIR/ccache-$dist"
+                export -n CCACHE_RECACHE
+                export PATH="/usr/lib/ccache/bin:$PATH"
+                mkdir -p "$CCACHE_DIR"
+            else
+                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
+            ### 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"
+            ### Disable ExtUtils::AutoInstall in perl packages
+            export PERL_EXTUTILS_AUTOINSTALL="--skipdeps --skip"
 
-			### Remove buildroot
-			rm -rf "$TEMPDIR/root-$app-$VERSION"
+            ### Remove buildroot
+            rm -rf "$TEMPDIR/root-$app-$VERSION"
 
-			### Prepare rpm options
-			if [ "$FORCE_VERBOSE" ]; then
-				RPMBUILDOPTS="$RPMBUILDOPTS -vv --target $arch"
-			else
-				RPMBUILDOPTS="$RPMBUILDOPTS --target $arch"
-			fi
+            ### Prepare rpm options
+            if [ "$FORCE_VERBOSE" ]; then
+                RPMBUILDOPTS="$RPMBUILDOPTS -vv --target $arch"
+            else
+                RPMBUILDOPTS="$RPMBUILDOPTS --target $arch"
+            fi
 
-			if [ "$FORCE_VERBOSE" == "yes" ]; then
-				echo "Building $dist/$arch [$SPECDIR/_buildlogs/$LOGFILE]."
-			fi
+            if [ "$FORCE_VERBOSE" == "yes" ]; then
+                echo "Building $dist/$arch [$SPECDIR/_buildlogs/$LOGFILE]."
+            fi
 
-			### Check for Soapbox
-			if [ "$SOAPBOX" == "1" -a -f "/lib/libsoapbox.so" -a -f "$CHROOTDIR/$dist/lib/libsoapbox.so" ]; then
-				export SOAPBOXPATH="$PACKAGEDIR/$app/_buildlogs:$PACKAGEDIR/$app:$TEMPDIR:$BUILDDIR:/dev/null:/dev/tty:/tmp:/var/lib/rpm/__db:$HOME/.distcc"
-				export SOAPBOXLOG="$TEMPDIR/soapbox-$LOGFILE"
-				rm -f "$SOAPBOXLOG"
-				export LD_PRELOAD="/lib/libsoapbox.so"
-			fi
+            ### Check for Soapbox
+            if [ "$SOAPBOX" == "1" -a -f "/lib/libsoapbox.so" -a -f "$CHROOTDIR/$dist/lib/libsoapbox.so" ]; then
+                export SOAPBOXPATH="$PACKAGEDIR/$app/_buildlogs:$PACKAGEDIR/$app:$TEMPDIR:$BUILDDIR:/dev/null:/dev/tty:/tmp:/var/lib/rpm/__db:$HOME/.distcc"
+                export SOAPBOXLOG="$TEMPDIR/soapbox-$LOGFILE.log"
+                rm -f "$SOAPBOXLOG"
+                export LD_PRELOAD="/lib/libsoapbox.so"
+            fi
 
-			BUILDCMD="/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 $BUILDDIR\" \
-					--define \"_tmppath $TEMPDIR\" \
-					--define \"debug_package %nil\" \
-					--define \"dtag $DISTNAME\" \
-					--define \"disttag $DISTNAME\" \
-					--define \"$DISTNAME 1\" \
-					--define \"$DISTNICK 1\" \"$NEWSPECFILE\""
+            BUILDCMD="/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 $BUILDDIR\" \
+                    --define \"_tmppath $TEMPDIR\" \
+                    --define \"debug_package %nil\" \
+                    --define \"dtag $DISTNAME\" \
+                    --define \"disttag $DISTNAME\" \
+                    --define \"$DISTNAME 1\" \
+                    --define \"$DISTNICK 1\" \"$NEWSPECFILE\""
 
-			(
-				echo "Build command:" $BUILDCMD
-				echo "Build path: $PATH"
+            (
+                echo "Build command:" $BUILDCMD
+                echo "Build path: $PATH"
 
-				echo -e "\n----- Spec file -----"
-				cat "$NEWSPECFILE"
+                echo -e "\n----- Spec file -----"
+                cat "$NEWSPECFILE"
 
-				echo -e "\n----- Build log -----"
+                echo -e "\n----- Expanded spec file -----"
+                rpmdb -D "dtag $DISTNAME" -D "disttag $DISTNAME" -D "$DISTNICK 1" -D "$DISTNAME 1" -D "_smp_mflags $MAKEFLAGS" -E "%{expand:%(cat $SPECFILE)}"
 
-				### 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"
-				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 'dist $DISTNAME' \
-						--define 'disttag $DISTNAME' \
-						--define '$DISTNAME 1' \
-						--define '$DISTNICK 1' \
-						$NEWSPECFILE"
-				fi
+                echo -e "\n----- Build log -----"
 
-			) >>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE" 2>&1
-#			CHROOT="/usr/bin/compartment --chroot $CHROOTDIR/$dist --user $BUILD_USER --group $BUILD_USER --init /usr/lib/dar/compartment.sh --quiet"
+                ### 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"
+                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"
+                fi
 
-			RC=$?
-			export -n LD_PRELOAD
+            ) >>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO" 2>&1
+#           CHROOT="/usr/bin/compartment --chroot $CHROOTDIR/$dist --user $BUILD_USER --group $BUILD_USER --init /usr/lib/dar/compartment.sh --quiet"
 
-			### Restore PATH
-			export PATH="$OLDPATH"
+            RC=$?
+            export -n LD_PRELOAD
 
-			### Finish logging
-			(	echo -e "\n----- Return code -----"
-				echo "$RC"
-				if [ -d "$TEMPDIR/$app-$VERSION-$RELEASE-root" ]; then
-					echo -e "\n----- Buildroot content -----"
-					find "$TEMPDIR/$app-$VERSION-$RELEASE-root" 2>/dev/null
-				fi
-				if [ -s "$SOAPBOXLOG" ]; then
-					if [ $RC -eq 0 ]; then
-						warning "Soapbox violations, see \"$PACKAGEDIR/$app/_buildlogs/$LOGFILE.bz2\"."
-					else
-						warning "Soapbox violations, see log."
-					fi
-					echo -e "\n----- Actions outside buildroot -----"
-					cat "$SOAPBOXLOG"
-					RC=15
-				fi
-				rm -f "$SOAPBOXLOG"
-				echo -e "\n----- End of file -----"
-			) >>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE" 2>&1
+            ### Restore PATH
+            export PATH="$OLDPATH"
 
+            ### Finish logging
+            (   echo -e "\n----- Return code -----"
+                echo "$RC"
+                if [ -d "$TEMPDIR/$app-$VERSION-$RELEASE-root" ]; then
+                    echo -e "\n----- Buildroot content -----"
+                    find "$TEMPDIR/$app-$VERSION-$RELEASE-root" 2>/dev/null
+                fi
+                if [ -s "$SOAPBOXLOG" ]; then
+                    if [ $RC -eq 0 ]; then
+                        warning "Soapbox violations, see \"$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO.gz\"."
+                    else
+                        warning "Soapbox violations, see log."
+                    fi
+                    echo -e "\n----- Actions outside buildroot -----"
+                    cat "$SOAPBOXLOG"
+                    RC=15
+                fi
+                rm -f "$SOAPBOXLOG"
+                echo -e "\n----- End of file -----"
+            ) >>"$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO" 2>&1
 
-			if [ $RC -eq 0 ]; then
-				DARBUILDRC=0
-				if [ "$FORCE_VERBOSE" == "yes" ]; then
-					echo -e "${_GR}Success${_DE} $app [$dist/$arch], file in [$PACKAGEDIR/$app/]"
-				fi
-				echo "$app [$dist/$arch] ${SPECFILE/*\/} $LOGFILE" >>/dar/log/dar-build-success.log
-				cp -au "$SPECFILE" "$PACKAGEDIR/$app/"
+            ### Check if an RPM package was successfully built.
+            grep -q -E '^Wrote: .*.rpm$' "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO"
+            RC=$?
 
-				if [ "$RETAIN_LOGS" == "yes" ]; then
-#					bzip2 -9 -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE"
-					gzip -9 --rsyncable -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE"
-				fi
+            if [ $RC -eq 0 ]; then
+                DARBUILDRC=0
+                mv -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO" "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_OK"
+                rm -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO.gz"
+                if [ "$FORCE_VERBOSE" == "yes" ]; then
+                    echo -e "${_GR}Success${_DE} $app [$dist/$arch], see log [$SPECDIR/_buildlogs/$LOGFILE_OK]"
+                fi
+                echo "$app [$dist/$arch] ${SPECFILE/*\/} $LOGFILE_OK" >>/dar/log/dar-build-success.log
+                cp -au "$SPECFILE" "$PACKAGEDIR/$app/"
 
-				### Clean up current and older logfile
-				rm -f "$DISTCC_LOG"
+                if [ "$RETAIN_LOGS" == "yes" ]; then
+#                   bzip2 -9 -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_OK"
+                    gzip -9 --rsyncable -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_OK"
+                fi
 
-				if [ -z "$SOURCE_DISTS" ]; then
-					SOURCE_DISTS="$DISTNICK"
-				fi
-			else
-#				log "Failed building package $app for $dist/$arch." >> "$LOGDIR/dar.log"
-				error "${_RE}Failed${_DE} $app [$dist/$arch], see log [$SPECDIR/_buildlogs/$LOGFILE]"
-				echo "$app [$dist/$arch] ${SPECFILE/*\/} $LOGFILE" >>/dar/log/dar-build-failed.log
-#				bzip2 -9 -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE"
-				gzip -9 --rsyncable -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE"
-			fi
-			rm -f "$NEWSPECFILE"
-		done
-	done
+                ### Clean up current and older logfile
+                rm -f "$DISTCC_LOG"
 
-	RPMFILE="$app-$VERSION-$RELEASE.$TAG.src.rpm"
-	### Only build when there was a succesful binary build
-#	if [ -z "$NOSOURCE" -a "$DARBUILDRC" -eq 0 -o ! -f "$PACKAGEDIR/$app/$RPMFILE" ]; then
-	if [ -z "$NOSOURCE" -a "$DARBUILDRC" -eq 0 ]; then
+                if [ -z "$SOURCE_DISTS" ]; then
+                    SOURCE_DISTS="$DISTNICK"
+                fi
+            else
+#               log "Failed building package $app for $dist/$arch." >> "$LOGDIR/dar.log"
+                error "${_RE}Failed${_DE} $app [$dist/$arch], see log [$SPECDIR/_buildlogs/$LOGFILE_KO]"
+                echo "$app [$dist/$arch] ${SPECFILE/*\/} $LOGFILE_KO" >>/dar/log/dar-build-failed.log
+#               bzip2 -9 -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO"
+                gzip -9 --rsyncable -f "$PACKAGEDIR/$app/_buildlogs/$LOGFILE_KO"
+            fi
+            rm -f "$NEWSPECFILE"
+        done
+    done
 
-		if [ -z "$SOURCE_DISTS" ]; then SOURCE_DISTS="$DEFAULT_SOURCE_DISTS"; fi
+    RPMFILE="$app-$VERSION-$RELEASE.$TAG.src.rpm"
+    ### Only build when there was a succesful binary build
+#   if [ -z "$NOSOURCE" -a "$DARBUILDRC" -eq 0 -o ! -f "$PACKAGEDIR/$app/$RPMFILE" ]; then
+    if [ -z "$NOSOURCE" -a "$DARBUILDRC" -eq 0 ]; then
 
-		for dist in $SOURCE_DISTS; do
-			if [ -r "$CONFIGDIR/dists/$dist/config" ]; then
-				source "$CONFIGDIR/dists/$dist/config"
-			else
-				warning "Configfile $CONFIGDIR/dists/$dist/config missing. Aborting."
-				continue
-			fi
+        if [ -z "$SOURCE_DISTS" ]; then SOURCE_DISTS="$DEFAULT_SOURCE_DISTS"; fi
 
-			RPMFILE="$app-$VERSION-$RELEASE.$TAG.src.rpm"
+        for dist in $SOURCE_DISTS; do
+            if [ -r "$CONFIGDIR/dists/$dist/config" ]; then
+                source "$CONFIGDIR/dists/$dist/config"
+            else
+                warning "Configfile $CONFIGDIR/dists/$dist/config missing. Aborting."
+                continue
+            fi
 
-			NEWSPECFILE="$TEMPDIR/$app.spec"
-			cp -af "$SPECFILE" "$NEWSPECFILE"
-			export buildarch="src" distarch="$DISTARCH" disttag="$DISTNAME" specfile="$NEWSPECFILE" repotag="$TAG"
-			for script in $CONFIGDIR/scripts/pre-*.sh; do
-				source "$script"
-			done
+            RPMFILE="$app-$VERSION-$RELEASE.$TAG.src.rpm"
 
-			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
-			RC=$?
-			if [ $RC -eq 0 ]; then
-				if [ "$FORCE_VERBOSE" == "yes" ]; then
-					echo -e "${_GR}Success${_DE} $app [$dist/src], file in [$PACKAGEDIR/$app/]"
-				fi
-				echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-success.log
-			else
-				error "${_RE}Failed${_DE} $app [$dist/src], see log [$SPECDIR/_buildlogs/$LOGFILE]"
-				echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-failed.log
-			fi
+            NEWSPECFILE="$TEMPDIR/$app.spec"
+            cp -af "$SPECFILE" "$NEWSPECFILE"
+            export buildarch="src" distarch="$DISTARCH" disttag="$DISTNAME" specfile="$NEWSPECFILE" repotag="$TAG"
+            for script in $CONFIGDIR/scripts/pre-*.sh; do
+                source "$script"
+            done
 
-			cp -au "$SPECFILE" "$PACKAGEDIR/$app/"
-		done
+            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
+            RC=$?
+            if [ $RC -eq 0 ]; then
+                if [ "$FORCE_VERBOSE" == "yes" ]; then
+                    echo -e "${_GR}Success${_DE} $app [$dist/src], file in [$PACKAGEDIR/$app/]"
+                fi
+                echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-success.log
+            else
+                error "${_RE}Failed${_DE} $app [$dist/src], see log [$SPECDIR/_buildlogs/$LOGFILE]"
+                echo "$app [$dist/src] ${SPECFILE/*\/}" >>/dar/log/dar-build-failed.log
+            fi
 
-	fi
+            cp -au "$SPECFILE" "$PACKAGEDIR/$app/"
+        done
+
+    fi
 done
 
 exit 0

Modified: trunk/tools/dar/dar-functions
===================================================================
--- trunk/tools/dar/dar-functions	2008-05-09 19:56:13 UTC (rev 6306)
+++ trunk/tools/dar/dar-functions	2008-05-09 20:59:58 UTC (rev 6307)
@@ -96,7 +96,8 @@
 		fi
 
     (
-	if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! chroot "$CHROOTDIR/$DISTNICK" /bin/su -lm $BUILD_USER -c "rpmdb -D \"dist $DISTNAME\" -D \"disttag $DISTNAME\" -D \"$DISTNICK 1\" -D \"$DISTNAME 1\" -E \"%{expand:%(head -n128 $SPECFILE)}\"" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
+#	if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! chroot "$CHROOTDIR/$DISTNICK" /bin/su -lm $BUILD_USER -c "rpmdb -D \"dtag $DISTNAME\" -D \"disttag $DISTNAME\" -D \"$DISTNICK 1\" -D \"$DISTNAME 1\" -E \"%{expand:%(head -n128 $SPECFILE)}\"" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
+	if [ -z "$DISTNICK" ] || [ "$RPMVER" \< "4.1" ] || ! chroot "$CHROOTDIR/$DISTNICK" /bin/su -lm $BUILD_USER -c "rpmdb -D \"dtag $DISTNAME\" -D \"disttag $DISTNAME\" -D \"$DISTNICK 1\" -D \"$DISTNAME 1\" -E \"%{expand:%(head -n128 $SPECFILE)}\"" | grep -i "^ *$CONFIG *:" | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
 		if ! grep -i "^ *$CONFIG *:" $SPECFILE | sed -e "s/^ *$CONFIG *: *//i" | head -1; then
 			debug "Config $CONFIG not found in $SPECFILE"
 		fi
@@ -526,9 +527,9 @@
 	done
 	echo "</repomd>" >>"$REPODATA/repomd.xml"
 
-	echo "Building repoview."
-	repoview --quiet --title="RPMforge: $DISTDESC" "$FTPDIR/$DISTPATH/$REPO"
-	repoview --quiet --url="http://apt.sw.be/$DISTPATH/" "$FTPDIR/$DISTPATH/$REPO"
+#	echo "Building repoview."
+#	repoview --quiet --title="RPMforge: $DISTDESC" "$FTPDIR/$DISTPATH/$REPO"
+#	repoview --quiet --url="http://apt.sw.be/$DISTPATH/" "$FTPDIR/$DISTPATH/$REPO"
 }
 
 function build_repo_srpms {

Modified: trunk/tools/dar/dar-perl.py
===================================================================
--- trunk/tools/dar/dar-perl.py	2008-05-09 19:56:13 UTC (rev 6306)
+++ trunk/tools/dar/dar-perl.py	2008-05-09 20:59:58 UTC (rev 6307)
@@ -258,7 +258,7 @@
     realversion = version
     ### FIXME: take care of file like Acme-6502-v0.0.6 or something.tgz
     ### Get the version from the cdistname
-    m = re.match('[^\d]+([\d\.]+).tar.gz', cdistname)
+    m = re.match('[^\d]+([\d\.\w]+).tar.gz', cdistname)
     if m:
         l = m.groups()
         version = l[0]
@@ -515,7 +515,7 @@
 ### FIXME: Add BuildRequires from Makefile.PL ?
 if meta.has_key('requires') and meta['requires'] and meta['requires'].has_key('perl'):
     ### FIXME: lstrip 'v' from version if it is a string
-    print >>out, "BuildRequires: perl >= %s " % epochify(meta['requires']['perl'])
+    print >>out, "BuildRequires: perl >= %s" % epochify(meta['requires']['perl'])
 else:
     print >>out, 'BuildRequires: perl'
 
@@ -532,6 +532,10 @@
         else:
             print >>out, "BuildRequires: perl(%s)" % key
 
+if meta.has_key('requires') and meta['requires'] and meta['requires'].has_key('perl'):
+    ### FIXME: lstrip 'v' from version if it is a string
+    print >>out, "Requires: perl >= %s" % epochify(meta['requires']['perl'])
+
 ### Requires are extracted by RPM itself
 #print "Requires: perl"
 #if meta.has_key('requires'):

Modified: trunk/tools/dar/dar.conf
===================================================================
--- trunk/tools/dar/dar.conf	2008-05-09 19:56:13 UTC (rev 6306)
+++ trunk/tools/dar/dar.conf	2008-05-09 20:59:58 UTC (rev 6307)
@@ -29,10 +29,12 @@
 DISTCC_HOSTS="emyn localhost"
 
 ### Variables for dar-sync
-RSYNC_OPTIONS="-avHl --progress --delete-after --exclude /bert/ --exclude /dries/ --exclude /redhat/6.2/ --exclude /redhat/8.0/ --include /rpmforge/persona/dag/ --exclude /rpmforge/persona/* --delay-updates"
+#RSYNC_OPTIONS="-avHl --progress --delete-after --delay-updates"
+#RSYNC_TARGET="dag at surya.karan.org:/mnt/rpmforge/incoming/dag/packages/"
 #RSYNC_OPTIONS="-avHl --progress --delete-after --exclude /bert/ --exclude /dries/ --exclude /redhat/6.2/ --exclude /redhat/8.0/ --include /rpmforge/persona/dag/ --exclude /rpmforge/persona/* --delay-updates --fuzzy"
+RSYNC_OPTIONS="-avHl --progress --delete-after --exclude /arrfab/ --exclude /bert/ --exclude /dries/ --exclude /redhat/6.2/ --exclude /redhat/8.0/ --include /rpmforge/persona/dag/ --exclude /rpmforge/persona/* --delay-updates"
 RSYNC_TARGET="dag at rsync.sw.be:dag.wieers.com/pub/"
 ### Use wondershaper
-RSYNC_LIMIT="16"
+RSYNC_LIMIT="32"
 GPG_PATH="/home/dag/.gnupg"
 GPG_NAME="Dag Wieers (Dag Apt Repository v1.0)"




More information about the commits mailing list