Introduce changelog trimming in binary packages feature (ticket #47)
authorJindrich Novy <jnovy@redhat.com>
Thu, 16 Apr 2009 12:13:34 +0000 (14:13 +0200)
committerJindrich Novy <jnovy@redhat.com>
Thu, 16 Apr 2009 12:13:34 +0000 (14:13 +0200)
build/parseChangelog.c

index 96e591c..6c6e6a9 100644 (file)
@@ -117,6 +117,7 @@ static rpmRC addChangelog(Header h, StringBuf sb)
     int i;
     time_t time;
     time_t lastTime = 0;
+    time_t trimtime = rpmExpandNumeric("%{?_changelog_trimtime}");
     char *date, *name, *text, *next;
 
     s = getStringBuf(sb);
@@ -198,7 +199,10 @@ static rpmRC addChangelog(Header h, StringBuf sb)
            *s-- = '\0';
        }
        
-       addChangelogEntry(h, time, name, text);
+       if ( !trimtime || time >= trimtime ) {
+           addChangelogEntry(h, time, name, text);
+       } else break;
+       
        s = next;
     }