Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Allow variable refs in HOMEPAGE
Date: Thu, 03 Aug 2017 15:54:32
Message-Id: 1501775657.22592.3.camel@gentoo.org
In Reply to: [gentoo-dev] Allow variable refs in HOMEPAGE by Mike Gilbert
1 On czw, 2017-08-03 at 11:33 -0400, Mike Gilbert wrote:
2 > I would like to remove the ban on variable references in the HOMEPAGE
3 > variable in ebuilds.
4 >
5 > As I understand it, this ban was put in place so that people can
6 > easily copy/paste from an ebuild to a web browser.
7 >
8 > If people want to copy/paste the URL, they can easily query the final
9 > value using the portage API, or a tool written against it.
10
11 I object! Portage API does not work conveniently for ebuilds scattered
12 all over the place, or visible through gitweb.
13
14 In fact, I would like to request an opposite motion: I would like to ban
15 all constant-value variable references unless they give a *very* large
16 measurable benefit.
17
18 I'm really tired of people who try hard to replace everything with
19 a variable when it doesn't give any benefit. It only means that:
20
21 - when reviewing multiple ebuilds, I constantly need to look at PN to
22 figure out whether someone didn't screw up the vars,
23
24 - things are not suitable for straightforward copy-paste for testing,
25
26 - everything falls apart when someone renames the package (either us or
27 upstream). In particular, it becomes PITA to figure out which ${PN}
28 represent the upstream name, and which ones strictly refer to the
29 package name.
30
31 In other words:
32
33 a. P/PV/PF are acceptable because versions change frequently,
34
35 b. PN might be acceptable when used for MY_P and so on,
36
37 c. no variables in HOMEPAGE, EGIT_REPO_URI, constant part of SRC_URI
38 (so I could at least open the directory containing the file),
39
40 d. no random ${PN} all over the install phase.
41
42 > Allowing variables in HOMEPAGE would allow for easier copying of
43 > similar/identical ebuilds. For example, see the trivial ebuilds in my
44 > overlay below.
45 >
46 > https://bitbucket.org/floppym/floppym-overlay/src/8b55fab291ec1f9be93ade9c91e7d62d7b8a259d/dev-go/cloudflare-go/cloudflare-go-0.7.4.ebuild
47 >
48 > https://bitbucket.org/floppym/floppym-overlay/src/8b55fab291ec1f9be93ade9c91e7d62d7b8a259d/dev-go/pkg-errors/pkg-errors-0.8.0.ebuild
49 >
50 > https://bitbucket.org/floppym/floppym-overlay/src/8b55fab291ec1f9be93ade9c91e7d62d7b8a259d/dev-go/urfave-cli/urfave-cli-1.19.1.ebuild
51
52 Laziness shouldn't be an excuse to make things worse. You can write
53 yourself a tool that puts correct values there.
54
55 --
56 Best regards,
57 Michał Górny

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] Allow variable refs in HOMEPAGE Mike Gilbert <floppym@g.o>
Re: [gentoo-dev] Allow variable refs in HOMEPAGE Sam Jorna <wraeth@g.o>