Hi,

I'm new to this list put I have been using Gentoo for several years. Thank you for all the hard work you put into this beautiful distribution. Since I'm behind a quite restrictive proxy at work, I have to frequently use emerge-webrsync. I looked at the script today and thought that 2 things might make sense/be nice.

I put a "nice -n 19" in front of the tar, rsync and emerge metadata commands because normally calling emerge-webrsync renders my box unusable for 15 to 20 minutes. You still notice a difference when using "nice" but everything seems to be at least noticably smoother than before.

The other change is that you can call emerge-webrsync with the "-q" option to suppress the rsync output.

Please tell me what you think!

- Johannes.
--- /usr/sbin/emerge-webrsync	2005-12-28 11:49:18.000000000 +0100
+++ emerge-webrsync	2005-12-28 12:41:58.838852352 +0100
@@ -18,9 +18,14 @@
 cd "$DISTDIR"
 
 found=0
+rsyncops="-av --progress"
+
 if [ "$1" == "-v" ] ; then
 	wgetops=
 else	
+        if [ "$1" == "-q" ] ; then
+	        rsyncops="-aq"
+        fi
 	#this sucks.  probably better to do 1> /dev/null
 	#that said, waiting on the refactoring.
 	if [ "${FETCHCOMMAND/wget}" != "${FETCHCOMMAND}" ]; then
@@ -42,7 +47,7 @@
 
 sync_local() {
 	echo Syncing local tree...
-	if ! tar jxf $FILE; then
+	if ! nice -n 19 tar jxf $FILE; then
 		echo "Tar failed to extract the image. Please review the output."
 		echo "Executed command: tar jxf $FILE"
 		exit 1
@@ -51,14 +56,14 @@
 	# Make sure user and group file ownership is root
 	chown -R 0:0 portage
 	cd portage
-	rsync -av --progress --stats --delete --delete-after \
+	nice -n 19  rsync ${rsyncops} --stats --delete --delete-after \
 	--exclude='/distfiles' --exclude='/packages' \
 	--exclude='/local' . ${PORTDIR%%/}
 	cd ..
 	echo "cleaning up"
 	rm -rf portage
 	echo "transferring metadata/cache"
-	emerge metadata
+	nice -n 19 emerge metadata
 }
 
 echo "Fetching most recent snapshot"

Reply via email to