develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119625] [PATCH] e7c16d9 Update README copyright to 2013,and add test

Thread Next
From:
Smylers
Date:
September 6, 2013 05:25
Subject:
Re: [perl #119625] [PATCH] e7c16d9 Update README copyright to 2013,and add test
Message ID:
20130906052514.GB4330@stripey.com
Father Chrysostomos via RT writes:

> On Thu Sep 05 07:00:10 2013, smylers@stripey.com wrote:
> 
> > +=head1 NAME
> > +
> > +copyright.t
> > +
> > +=head1 DESCRIPTION
> > +
> > +Tests that the copyright notice in the top-level README file includes the
> > +current year.
> 
> Hmm.  If I’m reading this correctly, then when I try to install last
> year’s perl then tests will fail.

Ooops, yes. Sorry for not thinking that through properly.

Attached is a patch which just puts 2013 in README, since that's well
overdue for fixing regardless of whether we do anything to catch this in
future.

> I would prefer a note in the release manager’s guide.
> 
> While you could see whether the tests are being run under a git
> repository and see whether there are any commits in the current year
> before checking the README,

Yeah, finding the year of the most recent commit is straightforward:

  find_git_or_skip 'all';
  my $latest_commit = qx(git log -n 1 --format=format:%ct);
  my $year = (gmtime $latest_commit)[5] + 1900;

> that could *still* produce false positives; e.g., for downstream
> packagers.

Ah, yes. Only running the test if the current branch is blead would
presumably avoid that, but would mean that if the first commit of a year
is a merge it could cause a test failure that isn't apparent pre-merge.

Unless anybody can think of a way of detecting this situation, I'll drop
the test and submit a ‘Release Manager's Guide’ patch instead.

> That would be rare; nevertheless, if the correct thing to
> do is to ignore test failures under some circumstance, that suggests
> there is something wrong with the tests. 

Indeed. Thanks for your wisdom.

Smylers
-- 
Stop drug companies hiding negative research results.
Sign the AllTrials petition to get all clinical research results published.
Read more: http://www.alltrials.net/blog/the-alltrials-campaign/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About