Blame SOURCES/texinfo-6.5-fix-info-dir.patch

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