>From c503f583858142b1621924f69a956d4ac017a6ba Mon Sep 17 00:00:00 2001
From: Zac Medico <zmed...@gentoo.org>
Date: Fri, 24 Oct 2014 14:46:30 -0700
Subject: [PATCH] bin/ebuild: allow useful phases with pkg_config

It makes sense to run pkg_config by itself, but special phases like
"clean", "digest", and "manifest" can be useful. For example, if the
developer modifies the ebuild, then it's useful to regenerate the
manifest and use "clean" to discard the stale environment.

Fixes: bfa98d7a5b7a ("fixed ebuild so")
Reported-by: Vlastimil Babka <cas...@gentoo.org>
---
 bin/ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild b/bin/ebuild
index 02ee022..a62aa20 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -197,7 +197,11 @@ else:
                err('%s: does not seem to have a valid PORTDIR structure' % 
(ebuild,))
 
 if len(pargs) > 1 and "config" in pargs:
-       err('"config" must not be called with any other phase')
+       other_phases = set(pargs)
+       other_phases.difference_update(
+               ("clean", "config", "digest", "manifest"))
+       if other_phases:
+               err('"config" must not be called with any other phase')
 
 def discard_digests(myebuild, mysettings, mydbapi):
        """Discard all distfiles digests for the given ebuild.  This is useful 
when
-- 
2.0.4

Reply via email to