[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: outdated changelog timestamps (was Re: Date and Upsteam-URL fields)

* Joey Hess [Sun, 11 Jun 2006 19:53:41 -0400]:

> Adeodato Simó wrote:

> >   package (1.1) unstable; urgency=low

> >     [ Joe Random ]
> >     * Foo.


> This is very annoying when doing a test build, since it's not a valid
> changelog format and so you have to fake up some release date (and
> remember to undo it afterwards).

Right. As I wrote below, pity this breaks dpkg-parsechangelog, since
OTOH it's the format thant makes more sense to me, dunno about others.

*Evil ponder*

I wonder if the dpkg maintainers would accept the patch included below,
with dch being updated accordingly afterwards. May seem like a kludge at
first sight, but if you think about it, the 'debian' changelog format
lacks official syntax to specify "this is work in progress".

> > Pity that dpkg-parsechangelog would choke on that, and also, I haven't
> > heard anybody express discontent about this, so maybe I'm too picky,
> > which makes me think that everybody is happy with using dist=UNRELEASED
> > and updating the timestamp with each commit (or not doing, and risk
> > forgetting to do so the last time before uploading).

> It would be fairly easy to make dch only update the date when doing a
> dch -r.

Mmm? To be consistent with my quoted paragraph, this should read "It
would be fairly easy to make `dch` not update the date [nor the name] if
dist=UNRELEASED [and only do so with `dch -r`]". Which may not be a
change you'd be willing to make, but just pointing out what it'd take to
solve this from within dch, that's all.


Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
                                       Listening to: Amon Tobin - Slowly
--- /usr/lib/dpkg/parsechangelog/debian
+++ /usr/local/lib/dpkg/parsechangelog/debian
@@ -136,6 +136,19 @@
 #        $f{'Changes'}.= " .\n $_\n";
         $expect= 'next heading or eof';
         last if $since eq '';
+    } elsif (m/^ \-\- (UNRELEASED)/) {
+        $f{'Distribution'}= $1;
+        chomp(my $date = `822-date`);
+        $f{'Date'}= $date;
+        # can't use &parsecontrolfile; here...
+        chomp(my $host = `hostname`);
+        $f{'Maintainer'}= ($ENV{'DEBFULLNAME'} || $ENV{'NAME'} || $ENV{'LOGNAME'}) . " <" .
+                          ($ENV{'DEBEMAIL'} || $ENV{'EMAIL'} || $ENV{'LOGNAME'}."\@$host") . ">";
+        $expect= 'next heading or eof';
+        last if $since eq '';
     } elsif (m/^ \-\-/) {
         &clerror(_g("badly formatted trailer line"));
     } elsif (m/^\s{2,}\S/) {

Reply to: