2 --- rpm-4.4.6/build/parseChangelog.c~ 2006-04-30 17:34:40.334393487 +0300
3 +++ rpm-4.4.6/build/parseChangelog.c 2006-05-02 19:46:06.357193264 +0300
8 +#define CVS_RCSID "$""Log: "
9 +#define CVS_REVISION "Revision "
11 void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
13 int_32 mytime = time; /* XXX convert to header representation */
16 static time_t last = 0;
17 static int oneshot = 0;
18 + int numchangelog = rpmExpandNumeric("%{?_buildchangelogtruncate}");
20 /* Determine changelog truncation criteria. */
23 /* backup to end of description */
24 while ((s > text) && xisspace(*s))
27 + if (numchangelog && (s = strstr(text, CVS_RCSID))) {
28 + /* find end of line */
29 + while(*s && *s != '\n') s++;
38 + /* we reached place where first Revisions should be */
41 + if (strncmp(s, CVS_REVISION, sizeof(CVS_REVISION) - 1) == 0) {
42 + if (i++ == numchangelog) {
46 + while(*s && *s != '\n') s++;
55 + /* backup to the beginning of line */
56 + while ((s > text) && (*s == '\n' || xisspace(*s))) {
63 /* Add entry if not truncated. */