commit:     3c1366520d6ac404994d1d2c75d8750b16a4331c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 24 21:46:30 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Oct 24 22:53:57 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3c136652

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 <caster <AT> gentoo.org>
Reviewed-by: Alexander Berntsen <bernalex <AT> 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

Reply via email to