Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Removal of CVS headers
Date: Sun, 26 Feb 2017 15:26:36
Message-Id: 22706.62344.977061.900541@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] Removal of CVS headers by Ulrich Mueller
1 >>>>> On Sat, 25 Feb 2017, Ulrich Mueller wrote:
2
3 > As the council has decided in its 2014-10-14 meeting (and confirmed
4 > again in the 2016-11-13 meeting), CVS headers should be removed after
5 > the migration to Git. Until recently, this was blocked by repoman
6 > still checking for the $Id$ line. The latter is now fixed in the
7 > stable repoman version.
8
9 > Therefore, I am going to remove the remaining CVS headers throughout
10 > the tree (except for patches, of course) in two days from now.
11
12 So, let's schedule this. I will remove the headers on Tuesday,
13 2017-02-28, between 06:00 and 07:00 UTC.
14
15 You can help me by not pushing to the gentoo repository during that
16 hour (or until you see my commit). Especially any ebuild removals
17 would inevitably cause merge conflicts.
18
19 Also, after the conversion no new files with $Id$ lines should be
20 added, of course. Hopefully repoman will enforce that soon [1].
21
22 Since I've been asked about the conversion script: This isn't rocket
23 science, so there is no sophisticated script. :) Conversion will be
24 done in two passes. The first pass is automatic and will remove all
25 $Id$ lines in comment blocks that resemble our standard header:
26
27 find -type f ! -name Manifest ! -name '*.diff' ! -name '*.patch' \
28 -exec grep -l '^# \$\(Id\|Header\)\(: .*\)\?\$$' '{}' + | xargs sed -i \
29 '1,4{/^#.*\<Copyright\>.*\<Gentoo\>/!b;:x;n;/^# \$\(Id\|Header\)\(: .*\)\?\$$/d;/^#/bx;}'
30
31 This first pass will modify about 40000 files. It is followed by a
32 second pass, finding any remaining files with Id or Header keywords:
33
34 find -type f ! -name Manifest ! -name '*.diff' ! -name '*.patch' \
35 -exec grep -l '\$\(Id\|Header\)\>' '{}' +
36
37 This turns up about 240 files which can be fixed manually.
38 A preliminary version of that fix is available for review in [2].
39
40 Ulrich
41
42 [1] https://bugs.gentoo.org/610954
43 [2] https://dev.gentoo.org/~ulm/id-removal-2.diff

Replies

Subject Author
[gentoo-dev] Re: Removal of CVS headers Ulrich Mueller <ulm@g.o>