summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-07-06 20:23:57 +0000
committerZac Medico <zmedico@gentoo.org>2009-07-06 20:23:57 +0000
commit9e387129c51a6b5b1e1423ab68cdc4ea345bb731 (patch)
treecca09448b28311b7b0d71071a2a767b01eb92704 /bin
parentdb019afbb27145942daa3d2c9f2eaccde9f228ec (diff)
downloadportage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.tar.gz
portage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.tar.bz2
portage-9e387129c51a6b5b1e1423ab68cdc4ea345bb731.zip
Bug #273622 - Add pkg_pretend support for the ebuild(1) command (emerge
support not implemented yet). Thanks to Markus Meier <maekke@gentoo.org> for this patch. svn path=/main/trunk/; revision=13799
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index c9008e33e..634b3ce4f 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -662,6 +662,10 @@ ebuild_phase_with_hooks() {
done
}
+dyn_pretend() {
+ ebuild_phase_with_hooks pkg_pretend
+}
+
dyn_setup() {
ebuild_phase_with_hooks pkg_setup
}
@@ -1079,6 +1083,7 @@ dyn_help() {
echo "than one option is specified, each will be executed in order."
echo
echo " help : show this help screen"
+ echo " pretend : execute package specific pretend actions"
echo " setup : execute package specific setup actions"
echo " fetch : download source archive(s) and patches"
echo " digest : create a manifest file for the package"
@@ -1346,6 +1351,10 @@ _ebuild_arg_to_phase() {
local phase_func=""
case "$arg" in
+ pretend)
+ ! hasq $eapi 0 1 2 && \
+ phase_func=pkg_pretend
+ ;;
setup)
phase_func=pkg_setup
;;
@@ -1802,11 +1811,16 @@ _source_ebuild() {
pkg_nofetch pkg_postinst pkg_postrm pkg_preinst pkg_prerm
pkg_setup src_test src_unpack"
;;
- *)
+ 2)
valid_phases="src_compile pkg_config src_configure pkg_info
src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst
src_prepare pkg_prerm pkg_setup src_test src_unpack"
;;
+ *)
+ valid_phases="src_compile pkg_config src_configure pkg_info
+ src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst
+ src_prepare pkg_prerm pkg_pretend pkg_setup src_test src_unpack"
+ ;;
esac
DEFINED_PHASES=
@@ -2003,7 +2017,7 @@ ebuild_main() {
fi
export SANDBOX_ON="0"
;;
- help|setup|preinst)
+ help|pretend|setup|preinst)
#pkg_setup needs to be out of the sandbox for tmp file creation;
#for example, awking and piping a file in /tmp requires a temp file to be created
#in /etc. If pkg_setup is in the sandbox, both our lilo and apache ebuilds break.