Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] RFC: Repoman to warn about suspicious =-dependencies
Date: Sun, 04 Mar 2018 11:37:45
Message-Id: 1520163453.836.11.camel@gentoo.org
1 Hi, everyone.
2
3 I have proposed a new check for repoman [1] (with a patch at [2]) that
4 would warn developers about suspicious '=' deps.
5
6 By suspicious, I mean dependencies '=foo-1.2.3' which are sometimes
7 mistakenly used instead of '~foo-1.2.3', and cause some degree of mayhem
8 when someone revbumps the package (either by preventing people from
9 upgrading or causing depgraph breakage).
10
11 The check would trigger whenever '='-class dependency is used without
12 a revision specified and without the '*' suffix. It would suggest to
13 either use '~' operator when any revision is acceptable, or explicitly
14 specify '-r0' (which is equivalent to no revision specified).
15
16 In other words, repoman would complain at:
17
18 =dev-foo/bar-1.2.3
19
20 but it will be happy if you used:
21
22 ~dev-foo/bar-1-2.3
23 =dev-foo/bar-1.2.3-r0
24
25 I think this cause the trouble of specifying '-r0' rather rarely, and it
26 will decrease the number of mistakes, also effectively making Gentoo
27 development easier. It is somewhat inspired by the handling of slot
28 operators (where repoman explicitly asks you to use ':*' instead
29 of no operator when the latter would be ambiguous).
30
31 What do you think?
32
33 [1]:https://bugs.gentoo.org/649482
34 [2]:https://archives.gentoo.org/gentoo-portage-dev/message/59acb3995301966102b58fa8ed5bb6a5
35
36 --
37 Best regards,
38 Michał Górny

Replies