aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-16 13:00:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-16 13:00:48 +0000
commitd547c9899cc18b6241850e11f52fa2d3f9efecdb (patch)
treef1b3b35b2148dad5e998fbfcfe3e07f876795eca
parent004c04bf43f7a208b1a93273180aa8754f936912 (diff)
downloadpaludis-d547c9899cc18b6241850e11f52fa2d3f9efecdb.tar.gz
paludis-d547c9899cc18b6241850e11f52fa2d3f9efecdb.tar.xz
Split out the eselect env update call from builtin_tidyup into a new builtin_updateenv, making SKIP_FUNCTIONS=tidyup a lot more sensible.
-rw-r--r--ebuild/Makefile.am1
-rw-r--r--ebuild/builtin_tidyup.bash5
-rw-r--r--ebuild/builtin_updateenv.bash39
-rwxr-xr-xebuild/ebuild.bash2
-rw-r--r--paludis/portage_repository.cc3
5 files changed, 43 insertions, 7 deletions
diff --git a/ebuild/Makefile.am b/ebuild/Makefile.am
index 423ca71..2c94f9f 100644
--- a/ebuild/Makefile.am
+++ b/ebuild/Makefile.am
@@ -29,6 +29,7 @@ libexecprog_SCRIPTS = \
builtin_unmerge.bash \
builtin_tidyup.bash \
builtin_strip.bash \
+ builtin_updateenv.bash \
src_install.bash \
src_test.bash \
src_unpack.bash \
diff --git a/ebuild/builtin_tidyup.bash b/ebuild/builtin_tidyup.bash
index 6bb0d75..2039023 100644
--- a/ebuild/builtin_tidyup.bash
+++ b/ebuild/builtin_tidyup.bash
@@ -22,10 +22,6 @@ builtin_tidyup()
if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}/${PF}" ]] ; then
rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}/${PF}" || die "Couldn't remove work"
fi
-
- cd "${PALUDIS_TMPDIR}"
- echo eselect env update
- eselect env update || die "eselect env update failed"
}
ebuild_f_tidyup()
@@ -41,4 +37,3 @@ ebuild_f_tidyup()
fi
}
-
diff --git a/ebuild/builtin_updateenv.bash b/ebuild/builtin_updateenv.bash
new file mode 100644
index 0000000..4005baa
--- /dev/null
+++ b/ebuild/builtin_updateenv.bash
@@ -0,0 +1,39 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
+#
+# This file is part of the Paludis package manager. Paludis is free software;
+# you can redistribute it and/or modify it under the terms of the GNU General
+# Public License as published by the Free Software Foundation; either version
+# 2 of the License, or (at your option) any later version.
+#
+# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+builtin_updateenv()
+{
+ cd "${PALUDIS_TMPDIR}"
+ echo eselect env update
+ eselect env update || die "eselect env update failed"
+}
+
+ebuild_f_updateenv()
+{
+ if hasq "updateenv" ${RESTRICT} ; then
+ ebuild_section "Skipping builtin_updateenv (RESTRICT)"
+ elif hasq "tidyup" ${SKIP_FUNCTIONS} ; then
+ ebuild_section "Skipping builtin_updateenv (SKIP_FUNCTIONS)"
+ else
+ ebuild_section "Starting builtin_updateenv"
+ builtin_updateenv
+ ebuild_section "Done builtin_updateenv"
+ fi
+}
+
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index cb93457..a71a848 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -145,7 +145,7 @@ ebuild_main()
ebuild_load_module depend
;;
- init|fetch|merge|unmerge|tidyup|strip)
+ init|fetch|merge|unmerge|tidyup|updateenv|strip)
ebuild_load_module builtin_${action}
;;
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index ed64f41..adecb3a 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -1204,7 +1204,8 @@ PortageRepository::do_install(const QualifiedPackageName & q, const VersionSpec
actions = "";
}
else if (metadata->get(vmk_virtual).empty())
- actions = "init fetch setup unpack compile test install strip preinst merge postinst tidyup";
+ actions = "init fetch setup unpack compile test install strip preinst "
+ "merge postinst updateenv tidyup";
else
actions = "merge";