Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] git update hook: detecting missing Manifest DIST entries
Date: Mon, 07 Dec 2015 19:36:27
Message-Id: robbat2-20151207T192808-009660520Z@orbis-terrarum.net
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: app-emulation/runc/ by Matt Turner
1 On Mon, Dec 07, 2015 at 11:20:48AM -0800, Matt Turner wrote:
2 > >> This is happening with some frequency. Could we install a server-side
3 > >> git hook that prevents pushes if an ebuild is added without a Manifest
4 > >> change? It wouldn't have to verify anything more than that to catch
5 > >> nearly all of these problems.
6 > > That would not work for ebuilds which do not have any distfiles
7 > > associated with them.
8 >
9 > Good point.
10 >
11 > It *would* have to be somewhat more involved then...
12 I have given a lot of thought to it as well, because I've fixed it a
13 couple of times already or poked people to, and here's the best we can
14 do for the moment:
15
16 1. Script #1 (helper), that given an ebuild, spits out the filenames of the
17 distfiles.
18 - Use an explicitly specified PORTDIR for eclasses.
19 - Must NOT rely on the ebuild directory structure (i'd love to give
20 it the ebuild via stdin and tell it the path).
21 2. Script #2 (git update hook), check that filenames of distfiles are in
22 the Manifest
23 3. Abort if #2 fails.
24
25 Potential problems:
26 It'll have to rely on a potentially less up to date set of eclasses.
27 So if there is an eclass change shortly followed by an ebuild change,
28 and the eclass change influences the distfiles, it MIGHT get it wrong
29 (in either direction).
30
31 I have existing code similar to script #2, so we just need script #1.
32
33 --
34 Robin Hugh Johnson
35 Gentoo Linux: Developer, Infrastructure Lead, Foundation Trustee
36 E-Mail : robbat2@g.o
37 GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] git update hook: detecting missing Manifest DIST entries Peter Stuge <peter@×××××.se>