Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] package.deprecated: Create initial template
Date: Fri, 06 Dec 2019 11:33:55
Message-Id: 1748e88747d6c21d7a693af367591d8e299a0b7a.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] package.deprecated: Create initial template by Tim Harder
1 On Fri, 2019-12-06 at 03:23 -0500, Tim Harder wrote:
2 > On 2019-12-05 Thu 17:00, Alexis Ballier wrote:
3 > > > > pkgcheck is mostly used by your CI checks for
4 > > > > producing huge reports, which is nice but addresses a different
5 > > > > problem
6 > > > There is nothing stopping you from running pkgcheck locally. In
7 > > > fact,
8 > > > it should work out of the box these days. If you have any problems,
9 > > > please report them and I'm sure they will be addressed promptly.
10 > > Sure I did that to get reports like what CI does for me now but that's
11 > > always been a different usecase; I wasn't aware pkgcheck had the
12 > > equivalent of repoman commit
13 >
14 > While I dislike contributing more to this off-topic tangent, since I've
15 > fielded this question/request in IRC a few times in the past I figure I
16 > might as well address it again here for the IRC-averse.
17 >
18 > Personally I use pkgcheck as a QA tool and *git* (or another vcs tool)
19 > as a commit tool, just like how I used to use repoman and cvs a long
20 > time ago. I generally dislike when cli tools amalgamate disparate
21 > features that they weren't designed for so no one has been able to
22 > convince me why a tool designed to verify ebuilds and their related
23 > repos should support commit capabilities internally.
24 >
25 > Furthermore, pkgcheck was designed to scale towards scanning multiple
26 > pkgs, custom restrictions, or entire repos while I assume the majority
27 > of repoman usage is run against singular pkgs. In many cases, a
28 > multi-pkg scan doesn't map to a single commit so that functionality
29 > would be pretty useless in those situations.
30 >
31
32 Exactly. Building a workflow on 'repoman commit' is a horrible waste of
33 time. This in turn causes developers to make worse commits (e.g. by
34 combining a lot of irrelevant changes just to workaround the workflow).
35 It might have been necessary in times of CVS when we had to jump through
36 hoops to commit. It doesn't fit git world anymore.
37
38 A much better workflow is to commit first, then run pkgcheck
39 on everything affected, then push. It's faster, usually more correct
40 (as it checks the final state of all packages), and more flexible
41 (fixups, anyone?).
42
43 If you need something convenient to commit, app-portage/mgorny-dev-
44 scripts has pkgcommit tool which does the only useful part of what
45 repoman did -- that is, prepends package name to the commit message.
46 For pre-push checks, I use the following oneliner:
47
48 $ pkgcheck scan $(git diff origin --name-only $(<profiles/categories) \
49 | cut -d/ -f1-2 | sort -u); echo $?
50
51 I have it in bash history, and pkgch<pgup> takes care of it. If people
52 want, I can add it to mgorny-dev-scripts under some fancy name.
53
54 --
55 Best regards,
56 Michał Górny

Attachments

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

Replies