--- /usr/sbin/upgrade-system	2004-10-15 10:34:12.000000000 +0200
+++ /usr/sbin/upgrade-system-albert	2004-12-23 16:58:10.000000000 +0100
@@ -51,7 +51,7 @@
 		# save the orphan list for later use
 		ORPHANS=$( deborphan $ORPHANOPTS )
 
-		case $ORPHANS in
+		case "$ORPHANS" in
 			"")
 				echo "No orphan file to be purged."
 				break
@@ -59,7 +59,10 @@
 
 			*)
 				echo "Purging orphan files..."
-				echo $ORPHANS | xargs dpkg --purge
+				for o in "$ORPHANS" 
+				do
+					dpkg --purge $o
+				done
 				;;
 		esac
 	done

