Source: Internal (MontaVista)
Type: Bug Fix?
Description:

Fix bug 5425

Change the behavior of RPM when processing manifests from believing any 
"#" is a comment start, to only a "#" at the Beginning-of-Line is a 
comment.  (It allows for white space to be ignored at the BOL.)

This behavior is required to account for pathnames that have a "#" in 
them.

Index: manifest.c
===================================================================
RCS file: /cvs/devel/rpm/lib/manifest.c,v
retrieving revision 2.12
diff -u -r2.12 manifest.c
--- manifest.c	23 Jan 2003 20:23:24 -0000	2.12
+++ manifest.c	18 Aug 2004 21:10:00 -0000
@@ -92,15 +92,16 @@
 	    break;
 	}
 
-	/* Skip comments. */
-	if ((se = strchr(s, '#')) != NULL) *se = '\0';
-
 	/* Trim white space. */
 	se = s + strlen(s);
 	while (se > s && (se[-1] == '\n' || se[-1] == '\r'))
 	    *(--se) = '\0';
 	while (*s && strchr(" \f\n\r\t\v", *s) != NULL)
 	    s++;
+
+	/* Skip comments. (BOL only) */
+	if ( s[0] == '#' ) { s[0] = '\0'; se = s; }
+
 	if (*s == '\0') continue;
 
 	/* Insure that file contains only ASCII */
