858e30
This fixes two issues:
858e30
858e30
https://bugzilla.redhat.com/show_bug.cgi?id=1592433
858e30
This is a bug in fix-info-dir --delete
858e30
(Hunk 3)
858e30
858e30
https://bugzilla.redhat.com/show_bug.cgi?id=1614162
858e30
This is a weird infinite loop that happens when fix-info-dir is run with stderr
858e30
redirected to /dev/null while /dev/null doesn't exist (or isn't a device)
858e30
(Hunks 1 and 2)
858e30
858e30
diff --git a/contrib/fix-info-dir b/contrib/fix-info-dir
858e30
index 4439ada..9240060 100755
858e30
--- a/contrib/fix-info-dir
858e30
+++ b/contrib/fix-info-dir
858e30
@@ -124,6 +124,7 @@ if test "$CREATE_NODE"; then
858e30
 		fi
858e30
 		shift
858e30
 	else
858e30
+		SKIP_READ=yes
858e30
 		SKELETON=/dev/null
858e30
 
858e30
 	fi
858e30
@@ -188,7 +189,7 @@ DIR_FILE_END_OF_FILE
858e30
 
858e30
 	# Read one line from the file.  This is so that we can echo lines with
858e30
 	# whitespace and quoted characters in them.
858e30
-	while read fileline; do
858e30
+	while test -z "$SKIP_READ" && read fileline; do
858e30
 		# flag fancy features
858e30
 		if test ! -z "$echoline"; then        # echo line
858e30
 			echo "$fileline"
858e30
@@ -294,7 +295,7 @@ else
858e30
 	DONE_MSG="total invalid menu item(s) were removed from `pwd`/$DIR_FILE"
858e30
 	for Info_Name in `comm -23 $TMP_FILE1 $TMP_FILE2`; do
858e30
 		Changed="y"
858e30
-		if install-info --remove $Info_Name $DIR_FILE; then
858e30
+		if install-info --remove --remove-exactly $Info_Name $DIR_FILE; then
858e30
 			Total=`expr "$Total" + "1"`
858e30
 		fi
858e30
 	done