Re: Set of patches
Raphael Geissert <atomo64+debian@gmail.com> writes:
> Attached are a couple of patches against frontend/lintian.
> I'm working on using a dependencies map to run the collection and check
> scripts as soon as possible, more on it soon.
> From: Raphael Geissert <atomo64@gmail.com>
> Date: Wed, 1 Apr 2009 16:31:42 -0600
> Subject: [PATCH] Move the overrides file parsing code from the frontend to the Tags module
This is okay. Applied.
> From: Raphael Geissert <atomo64@gmail.com>
> Date: Wed, 1 Apr 2009 18:13:32 -0600
> Subject: [PATCH] Only read the ubuntu distributions lists once per run and mark the regular
> expressions with /o to avoid unecessary recompilation.
> diff --git a/frontend/lintian b/frontend/lintian
> index 803653d..fef2f61 100755
> --- a/frontend/lintian
> +++ b/frontend/lintian
> @@ -753,6 +753,9 @@ $LINTIAN_LAB = $LAB->{dir};
>
> $schedule = new Lintian::Schedule(verbose => $verbose);
> # process package/file arguments
> +{
> +my $ubuntu_dists = Lintian::Data->new ('changelog-file/ubuntu-dists');
> +my $ubuntu_regex = join('|', $ubuntu_dists->all);
Ew.
I don't think the micro-optimization of the case of running lintian on
multiple *.changes files in the same run (an uncommon use case) is worth
the unindented block.
I'd be good with making this a real global, but it's hard to do that in
frontend/lintian. I've been thinking for a while that the right
solution is to move all the changes file checking into some other
format.
Ideally, I'd like to see changes be a fourth type of "package" that can
have its corresponding checks scripts and is then handled just like
everything else that lintian checks, rather than being special-cased in
the frontend. That would make all of this code cleaner and make it more
natural to do the change you're doing here.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: