Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] bin/ebuild: allow useful phases with pkg_config
Date: Fri, 24 Oct 2014 21:52:22
Message-Id: 544ACA12.9050900@gentoo.org
1 From c503f583858142b1621924f69a956d4ac017a6ba Mon Sep 17 00:00:00 2001
2 From: Zac Medico <zmedico@g.o>
3 Date: Fri, 24 Oct 2014 14:46:30 -0700
4 Subject: [PATCH] bin/ebuild: allow useful phases with pkg_config
5
6 It makes sense to run pkg_config by itself, but special phases like
7 "clean", "digest", and "manifest" can be useful. For example, if the
8 developer modifies the ebuild, then it's useful to regenerate the
9 manifest and use "clean" to discard the stale environment.
10
11 Fixes: bfa98d7a5b7a ("fixed ebuild so")
12 Reported-by: Vlastimil Babka <caster@g.o>
13 ---
14 bin/ebuild | 6 +++++-
15 1 file changed, 5 insertions(+), 1 deletion(-)
16
17 diff --git a/bin/ebuild b/bin/ebuild
18 index 02ee022..a62aa20 100755
19 --- a/bin/ebuild
20 +++ b/bin/ebuild
21 @@ -197,7 +197,11 @@ else:
22 err('%s: does not seem to have a valid PORTDIR structure' % (ebuild,))
23
24 if len(pargs) > 1 and "config" in pargs:
25 - err('"config" must not be called with any other phase')
26 + other_phases = set(pargs)
27 + other_phases.difference_update(
28 + ("clean", "config", "digest", "manifest"))
29 + if other_phases:
30 + err('"config" must not be called with any other phase')
31
32 def discard_digests(myebuild, mysettings, mydbapi):
33 """Discard all distfiles digests for the given ebuild. This is useful when
34 --
35 2.0.4

Replies