summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ebuild.sh28
-rw-r--r--pym/portage/__init__.py2
-rw-r--r--pym/portage/cache/flat_list.py2
-rw-r--r--pym/portage/cache/metadata.py2
4 files changed, 30 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 7b4fa6868..bab8eca2c 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -2053,12 +2053,38 @@ ebuild_main() {
auxdbkeys="DEPEND RDEPEND SLOT SRC_URI RESTRICT HOMEPAGE LICENSE
DESCRIPTION KEYWORDS INHERITED IUSE CDEPEND PDEPEND PROVIDE EAPI
- PROPERTIES UNUSED_06 UNUSED_05 UNUSED_04
+ PROPERTIES DEFINED_PHASES UNUSED_05 UNUSED_04
UNUSED_03 UNUSED_02 UNUSED_01"
#the extra $(echo) commands remove newlines
unset CDEPEND
[ -n "${EAPI}" ] || EAPI=0
+ local eapi=$EAPI
+
+ # alphabetically ordered by $EBUILD_PHASE value
+ local valid_phases
+ case $eapi in
+ 0|1)
+ valid_phases="src_compile src_install pkg_nofetch
+ pkg_postinst pkg_postrm pkg_preinst pkg_prerm pkg_setup
+ src_test src_unpack"
+ ;;
+ *)
+ valid_phases="src_compile src_configure src_install
+ pkg_nofetch pkg_postinst pkg_postrm pkg_preinst
+ src_prepare pkg_prerm pkg_setup src_test src_unpack"
+ ;;
+ esac
+
+ DEFINED_PHASES=
+ for f in $valid_phases ; do
+ if [[ $(type -t $f) = function ]] ; then
+ f=${f#pkg_}
+ DEFINED_PHASES+=" ${f#src_}"
+ fi
+ done
+ [[ -n $DEFINED_PHASES ]] || DEFINED_PHASES=-
+
if [ -n "${dbkey}" ] ; then
> "${dbkey}"
for f in ${auxdbkeys} ; do
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 1267efb90..a69ca7a4a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7114,7 +7114,7 @@ auxdbkeys=[
'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
'KEYWORDS', 'INHERITED', 'IUSE', 'CDEPEND',
'PDEPEND', 'PROVIDE', 'EAPI',
- 'PROPERTIES', 'UNUSED_06', 'UNUSED_05', 'UNUSED_04',
+ 'PROPERTIES', 'DEFINED_PHASES', 'UNUSED_05', 'UNUSED_04',
'UNUSED_03', 'UNUSED_02', 'UNUSED_01',
]
auxdbkeylen=len(auxdbkeys)
diff --git a/pym/portage/cache/flat_list.py b/pym/portage/cache/flat_list.py
index 65983393f..413d4d33d 100644
--- a/pym/portage/cache/flat_list.py
+++ b/pym/portage/cache/flat_list.py
@@ -11,7 +11,7 @@ class database(fs_template.FsBased):
auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
'KEYWORDS', 'IUSE', 'CDEPEND',
- 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES')
+ 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES', 'DEFINED_PHASES')
def __init__(self, label, auxdbkeys, **config):
super(database,self).__init__(label, auxdbkeys, **config)
diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py
index 164761adb..86717e6c5 100644
--- a/pym/portage/cache/metadata.py
+++ b/pym/portage/cache/metadata.py
@@ -18,7 +18,7 @@ class database(flat_hash.database):
auxdbkey_order=('DEPEND', 'RDEPEND', 'SLOT', 'SRC_URI',
'RESTRICT', 'HOMEPAGE', 'LICENSE', 'DESCRIPTION',
'KEYWORDS', 'INHERITED', 'IUSE', 'CDEPEND',
- 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES')
+ 'PDEPEND', 'PROVIDE', 'EAPI', 'PROPERTIES', 'DEFINED_PHASES')
autocommits = True