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