SVN: toys/tools/cleanbuild/cleanbuild

sparky sparky at pld-linux.org
Tue Feb 23 15:01:07 CET 2010


Author: sparky
Date: Tue Feb 23 15:01:06 2010
New Revision: 11164

Modified:
   toys/tools/cleanbuild/cleanbuild
Log:
- use local poldek configuration instead of options
- findunusedbr support
- other things updated


Modified: toys/tools/cleanbuild/cleanbuild
==============================================================================
--- toys/tools/cleanbuild/cleanbuild	(original)
+++ toys/tools/cleanbuild/cleanbuild	Tue Feb 23 15:01:06 2010
@@ -3,7 +3,7 @@
 USER="sparky"
 RPMS_FROM="$HOME/rpm/cleanRPMS.repo"
 DEST="th"
-SRC="-n th -n th-ready"
+SRC="-n th-x86_64-test"
 SUFFIX=""
 CACHEDIR="$PWD/poldekcache"
 IGNORE=""
@@ -79,11 +79,11 @@
 	case "$OPT" in
 		-th-i[46]86 | -th-x86_64)
 			DEST="$V"
-			SRC="-n $V -n $V-ready -n th-noarch -n th-noarch-ready"
+			SRC="-n $V-ready"
 			;;
 		-ac-amd64 | -ac-i[356]86 | -ac-athlon)
 			DEST="$V"
-			SRC="-n $V"
+			SRC="-n $V-ready"
 			;;
 		--cleanafter | -ca)
 			CLEANAFTER=true
@@ -171,8 +171,6 @@
 	fi
 done
 
-poldek_options="-O keep_downloads=yes -O suggests=no -O ignore=vserver-packages -O unique_package_names=yes -O particle_install=no"
-
 ignore() { IGNORE="$IGNORE $*"; }
 ignore \
 	vserver-packages \
@@ -193,7 +191,9 @@
 	freetype1-devel \
 	kde-icons-actions kipi-plugins \
 	gnome-menus \
-	java-sun-jre
+	texlive-jadetex \
+	java-gcj-\* libgcj
+#	java-sun-jre
 
 
 rebuilddb()
@@ -204,7 +204,7 @@
 poldek()
 {
 	rebuilddb
-	/usr/bin/poldek $SRC -s "$RPMS_FROM" -r "$CHDIR" "--cachedir=$CACHEDIR" $poldek_options "$@"
+	/usr/bin/poldek $SRC -s "$RPMS_FROM" -r "$CHDIR" "--cachedir=$CACHEDIR" --conf=$PWD/poldekconf/poldek.conf "$@"
 }
 
 
@@ -234,12 +234,12 @@
 	title "preparing chroot"
 	set -e
 	mkdir $CHDIR
-	mount -t tmpfs -o size=8G /dev/null $CHDIR
+	mount -t tmpfs -o size=8G,relatime /dev/null $CHDIR
 	echo $$ > $CHDIR/.pid
 
 	rpm --root=$CHDIR --initdb 
 	poldek --up || :
-	poldek -O "ignore=$IGNORE" -u rpm-build
+	poldek -O "ignore=$IGNORE" -u rpm-build pwdutils coreutils
 
 	for DIR in dev proc sys; do
 		mount -o bind /$DIR $CHDIR/$DIR
@@ -252,9 +252,11 @@
 	cat <<-'EOM' > $CHDIR/$CHHOME/.rpmmacros
 	%_builddir		/BUILD
 	%buildroot		%{_builddir}/%{name}-%{version}-root-%(id -u -n)
-	%_rpmdir		%{_topdir}/cleanRPMS
+	%_rpmdirname	cleanRPMS
+	%_rpmdir		%{expand:%%global _rpmdir %([ -d %{_topdir}/../%{_rpmdirname} ] && (cd %{_topdir}/../%{_rpmdirname}; pwd) || echo %{_topdir}/%{_rpmdirname})}%_rpmdir
 	%distribution	CleanPLD
 	%_binary_payload	w1.gzdio
+	#%_smp_mflags	-j4
 EOM
 	cat <<-'EORC' > $CHDIR/$CHHOME/.builderrc
 	TITLECHANGE=no
@@ -283,6 +285,8 @@
 	LIST="$1"
 
 	print_installed info
+
+	return
 	echo "*** $build_pkg $(date --rfc-3339=seconds) ***" >> $LIST
 	print_installed echo >> $LIST
 }
@@ -394,6 +398,7 @@
 		info "moving $buildlog to $buildlog.$i"
 		mv $buildlog $buildlog.$i
 	fi
+	./findunusedbr -c $CHDIR $HOME/rpm/packages/$build_pkg/$build_pkg.spec
 	title "building"
 	{ chroot $CHDIR su $USER -c "$CHHOME/rpm/packages/builder -nn -bb $build_pkg $builder_options" 2>&1; echo $? > ecode; } | tee $buildlog
 
@@ -431,6 +436,7 @@
 	if [ $ECODE -eq 0 ]; then
 		$CLEANAFTER && clean
 		addlist BUILT_OK
+		./findunusedbr $CHDIR $HOME/rpm/packages/$build_pkg/$build_pkg.spec
 		info "$build_pkg built OK !"
 		title "OK !"
 		exit 0


More information about the pld-cvs-commit mailing list