Bug#651711: perl: Check that git exists before trying to use it

Niko Tyni ntyni at debian.org
Wed Dec 14 08:37:49 UTC 2011


On Sun, Dec 11, 2011 at 04:02:23PM +0000, Dominic Hargreaves wrote:
> Source: perl
> Version: 5.14.2-6
> Severity: minor
> 
> Without this check, a build run from a git repository without git
> being available may result in PERL_GIT_UNCOMMITTED_CHANGES being
> defined incorrectly.
> 
> My workflow was to build directly from the Debian git repository from
> a clean sid chroot, which was causing these to be shown up. Now I export
> the source directory first, to avoid this problem.
> 
> One disadvantage of this patch is that it may mask real changes which
> were made in a local repository if built without git available; if this
> was deemed problematic, I think we would instead patch out the git
> checks in the Debian package entirely.
> 
> I was going to send this straight to perlbug, but I thought that it would
> be worth disucssing locally because it's such an edge case which has a
> bigger impact for most on us -- and because of the problem noted above.

It seems to me that the checks for "is this a clone of the
official Perl git repository" should generally be smarter than
just testing for the presence of a .git directory. See
debian/patches/debian/skip-upstream-git-tests.diff

Such a smarter check also needs to test if the git command is available,
so make_patchnum.pl could use that if it was properly refactored out.

(Not sure how helpful this is.)
-- 
Niko






More information about the Perl-maintainers mailing list