Gentoo Archives: gentoo-dev

From: "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] git.eclass, git-2.eclass... git-r1.eclass?
Date: Sat, 31 Aug 2013 05:36:19
Message-Id: 52218112.2000606@gentoo.org
In Reply to: [gentoo-dev] [RFC] git.eclass, git-2.eclass... git-r1.eclass? by "Michał Górny"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 > The new eclass is supposedly used by 732 in-tree packages [1],
5 > and possibly a few dozens out-of-the-tree. Some parts of the eclass API
6 > are barely used. I would really prefer to avoid yet another eclass
7 > migration.
8
9 that's a shame, I don't think it is avoidable with the changes you are
10 suggesting
11
12 > However, I would like to do a few breaking changes to simplify
13 > the eclass and its maintenance:
14 >
15 > 1. Make EGIT_SOURCEDIR default to ${WORKDIR}/${P} rather than ${S}
16 > (to support setting S to subdirectory of git repo),
17 >
18 > 2. Kill EGIT_HAS_SUBMODULES and autodetect submodules,
19 >
20 > 3. Kill EGIT_OPTIONS since it limits the possibility of changing eclass
21 > code,
22 >
23 > 4. Kill EGIT_MASTER (it's more trouble than benefit),
24 >
25 > 5. Possibly kill EGIT_PROJECT -- it won't be good enough anymore,
26 >
27 > 6. Kill EGIT_NONBARE and support bare checkouts only. Supporting two
28 > different layouts introduces a lot redundant code.
29 >
30 > 7. Kill EGIT_NOUNPACK -- possibly replace it with proper fetching
31 > function, or just src_fetch(),
32 >
33 > 8. Kill EGIT_DIR -- it supposedly should not even be overriden.
34 >
35 These changes will cause significant breakage. That is fine for
36 migration, but not for in place eclass changes.
37 >
38 > But it's not all removing. There are also a few things I would like to
39 > change/add:
40 >
41 > 1. Replace 'git clone' with 'git init' + 'git fetch' that would be
42 > a bit simpler,
43 >
44 > 2. Add complete & working support for shallow clones, and make it the
45 > default. This means a lot of space-saving for people who only use
46 > the repos for ebuilds.
47 >
48 > 3. Add complete & proper support for submodules. Currently, submodules
49 > enforce non-bare clones and are fetched during unpack. After
50 > the change, they will be fetched and unpacked like normal repos.
51 >
52 >
53 > The use of API features in *.ebuild maps like the following;
54 >
55 > EGIT_REPO_URI 521
56 > EGIT_BRANCH 66
57 > EGIT_SOURCEDIR 21
58 > EGIT_PROJECT 17
59 > EGIT_HAS_SUBMODULES 15
60 > EGIT_COMMIT 12
61 > EGIT_BOOTSTRAP 12
62 > EGIT_MASTER 7
63 > EGIT_NOUNPACK 2
64 > EGIT_STORE_DIR 1
65 > EGIT_NONBARE 1
66 > EGIT_DIR 1
67 > EVCS_OFFLINE 0 // these are for make.conf
68 > EGIT_REPACK 0
69 > EGIT_PRUNE 0
70 > EGIT_OPTIONS 0
71 >
72 > I will need to take a look which of those cases can be replaced easily.
73 >
74 >
75 > How should I proceed? Assuming that git-2.eclass is used by live
76 > ebuilds only, and those ebuilds can be subject to random breakage,
77 > I could supposedly just start changing API of the eclass.
78 >
79 negative, breaking ebuilds is different than upstream breaking things
80 and needing ebuild fixes. Randomly breaking 700+ ebuilds isn't cool.
81
82 > On the other hand, I could also go for beautiful git-r1.eclass,
83 > and cleanly switch the packages.
84 >
85 > Then, I could go for something involving the two -- create a new
86 > git-r1.eclass that has API fully stripped, and start deprecating
87 > features from git-2.eclass. We would be able to switch to git-r1 to
88 > test offending packages safely, then do a big switch of remaining
89 > packages and make the two eclasses temporarily equivalent.
90 >
91 > What are your thoughts?
92 >
93 I have a VCS ebuild for nearly everything I officially maintain and
94 almost everything in the pentoo overlay. If you change the eclass in
95 place that will break dozens of ebuilds just for me. Please don't.
96
97 - -Zero
98 -----BEGIN PGP SIGNATURE-----
99 Version: GnuPG v2.0.20 (GNU/Linux)
100 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
101
102 iQIcBAEBAgAGBQJSIYESAAoJEKXdFCfdEflKdXUQAI3Rwqyku4FCgO/3uivB/ltN
103 +pDlw0DCHt9IlBK1Jh3t+ohXVdXhi6iZyQ7ly+t+5phA3zhR79yTJWkxmXq8E7br
104 TM99Fsfd3Cqmdc54F4uA6MHI9MQj7efCkE3mas9bks8SPBnNTVwWmjVYUxBXZXfm
105 J94+tcCEdesVqz2/iivm0iQ6W7EraCTG+umz/wz1urqIfDQBO8mDLHoM+jiovnUb
106 tArOZ3GIhS/Rj+S/ZtH4VpvarFrH5ZzfO1GpNAvaFS8kGLRdEoUnMYk6K+WNdbkZ
107 SYldaL8M/gNKWfmRU+j8OGK7bsNJx43Bqei7oUyMqkUVsTBpjmkPvw59aFKVlb7J
108 kdfeoobpFsuAcxaQfWU1J8map82N8McdVOYMkEkC3HJP33TeymZKSUcU2/iMxr1W
109 +kU0C2L7A9oXzWwkmiQ9WxAQ5KTYzyh5AzaaN45pju+QlFc2T4P4AZ4oqy+Zzzi2
110 CH2JZBPdv9+jMQLcwhpVoDsOPbbLGrx/aJEARwKvgs2fF+WYllraOu7uMPnaoYWw
111 wNK9JYyhncx2pfG23PG7Uo3RtN8Aks0tptsHosOmB9ZArtnhYL2SxlotAoef+9X7
112 2qxFm59D9koW5FF0arnzzF/ul2zzos7NZRwJ1bwR1gYocxvN6Yqfg0zeX6uC+sDW
113 dSukBOrVEuyftf+KurL9
114 =harh
115 -----END PGP SIGNATURE-----