aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-15 17:30:14 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-15 17:30:14 +0000
commit160ed2be1bc40ea52ef4bd45449a0d380e82d32c (patch)
tree1a4c18290f66fc8a092bd24189a85cdc9ccc5bd0
parente1a313c8906a710663cb90657f3945b0e068dd70 (diff)
downloadpaludis-160ed2be1bc40ea52ef4bd45449a0d380e82d32c.tar.gz
paludis-160ed2be1bc40ea52ef4bd45449a0d380e82d32c.tar.xz
More install work
-rw-r--r--ebuild/Makefile.am5
-rw-r--r--ebuild/builtin_fetch.bash (renamed from ebuild/src_fetch.bash)10
-rw-r--r--ebuild/builtin_init.bash (renamed from ebuild/pkg_init.bash)19
-rw-r--r--ebuild/builtin_merge.bash32
-rwxr-xr-xebuild/ebuild.bash10
-rw-r--r--ebuild/src_install.bash3
6 files changed, 61 insertions, 18 deletions
diff --git a/ebuild/Makefile.am b/ebuild/Makefile.am
index f6c1922..1dd7bbe 100644
--- a/ebuild/Makefile.am
+++ b/ebuild/Makefile.am
@@ -14,7 +14,7 @@ libexecprog_SCRIPTS = \
list_functions.bash \
multilib_functions.bash \
pkg_config.bash \
- pkg_init.bash \
+ builtin_init.bash \
pkg_nofetch.bash \
pkg_postinst.bash \
pkg_postrm.bash \
@@ -24,7 +24,8 @@ libexecprog_SCRIPTS = \
portage_stubs.bash \
sandbox_stubs.bash \
src_compile.bash \
- src_fetch.bash \
+ builtin_fetch.bash \
+ builtin_merge.bash \
src_install.bash \
src_test.bash \
src_unpack.bash \
diff --git a/ebuild/src_fetch.bash b/ebuild/builtin_fetch.bash
index 46d109b..6812393 100644
--- a/ebuild/src_fetch.bash
+++ b/ebuild/builtin_fetch.bash
@@ -17,7 +17,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-src_fetch()
+builtin_fetch()
{
local a nofetch unique_aa
for a in ${FLAT_SRC_URI} ; do
@@ -53,15 +53,15 @@ src_fetch()
eerror " * ${c}"
done
echo
- die "src_fetch failed"
+ die "builtin_fetch failed"
fi
}
ebuild_f_fetch()
{
- ebuild_section "Starting src_fetch"
- src_fetch
- ebuild_section "Done src_fetch"
+ ebuild_section "Starting builtin_fetch"
+ builtin_fetch
+ ebuild_section "Done builtin_fetch"
}
diff --git a/ebuild/pkg_init.bash b/ebuild/builtin_init.bash
index 7060664..9807737 100644
--- a/ebuild/pkg_init.bash
+++ b/ebuild/builtin_init.bash
@@ -17,7 +17,7 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-pkg_init()
+builtin_init()
{
local a
for a in P PV PR PN PVR PF CATEGORY FILESDIR ECLASSDIR PORTDIR \
@@ -29,16 +29,17 @@ pkg_init()
[[ -d "${!a}" ]] || die "\$${a} (\"${!a}\") not a directory"
done
- export WORKDIR="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/work"
- if [[ -f "${WORKDIR}" ]] ; then
- rm -fr "${WORKDIR}" || die "Couldn't clean out \$WORKDIR (\"${WORKDIR}\")"
+ if [[ -e "${PALUDIS_TMPDIR}/${CATEGORY}/${PF}" ]] ; then
+ rm -fr "${PALUDIS_TMPDIR}/${CATEGORY}/${PF}" || die "Couldn't remove previous work"
fi
+
+ export WORKDIR="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/work"
mkdir -p "${WORKDIR}" || die "Couldn't create \$WORKDIR (\"${WORKDIR}\")"
- export T="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/temp"
+ export T="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/temp/"
mkdir -p "${T}" || die "Couldn't create \$T (\"${T}\")"
- export D="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/image"
+ export D="${PALUDIS_TMPDIR}/${CATEGORY}/${PF}/image/"
mkdir -p "${D}" || die "Couldn't create \$D (\"${D}\")"
export S="${WORKDIR}/${P}"
@@ -48,8 +49,8 @@ pkg_init()
ebuild_f_init()
{
- ebuild_section "Starting pkg_init"
- pkg_init
- ebuild_section "Done pkg_init"
+ ebuild_section "Starting builtin_init"
+ builtin_init
+ ebuild_section "Done builtin_init"
}
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
new file mode 100644
index 0000000..a1d219a
--- /dev/null
+++ b/ebuild/builtin_merge.bash
@@ -0,0 +1,32 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Ciaran McCreesh <ciaranm@gentoo.org>
+#
+# 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_merge()
+{
+ install -d "${ROOT}/" || die "couldn't make \${ROOT} (\"${ROOT}\")"
+ cp -vdfpR "${D}/"* "${ROOT}/" || die "builtin_merge failed"
+}
+
+ebuild_f_merge()
+{
+ ebuild_section "Starting builtin_merge"
+ builtin_merge
+ ebuild_section "Done builtin_merge"
+}
+
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 5ef6d3d..559db40 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -93,13 +93,19 @@ ebuild_main()
ebuild_f_depend || die "${action} failed"
;;
- fetch|unpack|compile|install|test)
+ init|fetch|merge|tidyup)
+ ebuild_load_module builtin_${action}
+ ebuild_load_ebuild "${ebuild}"
+ ebuild_f_${action} || die "${action} failed"
+ ;;
+
+ unpack|compile|install|test)
ebuild_load_module src_${action}
ebuild_load_ebuild "${ebuild}"
ebuild_f_${action} || die "${action} failed"
;;
- init|setup|config|nofetch|preinst|postinst|prerm|postrm)
+ setup|config|nofetch|preinst|postinst|prerm|postrm)
ebuild_load_module pkg_${action}
ebuild_load_ebuild "${ebuild}"
ebuild_f_${action} || die "${action} failed"
diff --git a/ebuild/src_install.bash b/ebuild/src_install.bash
index 46d5d98..5322da4 100644
--- a/ebuild/src_install.bash
+++ b/ebuild/src_install.bash
@@ -28,6 +28,9 @@ src_install()
ebuild_f_install()
{
+ ebuild_section "Starting src_install"
+ cd ${S} || die "cd to \${S} (\"${S}\") failed"
src_install
+ ebuild_section "Done src_install"
}