aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-16 01:37:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-16 01:37:54 +0000
commita27b88cee3160f0d0a13f2bfbddef35314e59a8a (patch)
tree83618dd8c6f6edb39d09f3ae58f8a8db6569d5c0
parentb28fb7ad610d7128173015ab259fa542ec662723 (diff)
downloadpaludis-a27b88cee3160f0d0a13f2bfbddef35314e59a8a.tar.gz
paludis-a27b88cee3160f0d0a13f2bfbddef35314e59a8a.tar.xz
Small fixes
-rw-r--r--ebuild/builtin_init.bash3
-rw-r--r--ebuild/builtin_merge.bash3
-rwxr-xr-xebuild/ebuild.bash17
3 files changed, 21 insertions, 2 deletions
diff --git a/ebuild/builtin_init.bash b/ebuild/builtin_init.bash
index 9807737..b6a9c86 100644
--- a/ebuild/builtin_init.bash
+++ b/ebuild/builtin_init.bash
@@ -21,7 +21,8 @@ builtin_init()
{
local a
for a in P PV PR PN PVR PF CATEGORY FILESDIR ECLASSDIR PORTDIR \
- DISTDIR KV PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR ; do
+ DISTDIR KV PALUDIS_TMPDIR PALUDIS_EBUILD_LOG_LEVEL PALUDIS_EBUILD_DIR \
+ USERLAND KERNEL ARCH CHOST ; do
[[ -z "${!a}" ]] && die "\$${a} unset or empty"
done
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
index 50e34ce..e435b71 100644
--- a/ebuild/builtin_merge.bash
+++ b/ebuild/builtin_merge.bash
@@ -43,9 +43,10 @@ builtin_merge()
while read f ; do
ff=${f#${D}}
ff=${ff//+(\/)/\/}
+ [[ "${ff}" == "/" ]] && continue
if [[ -d "${f}" ]] ; then
echo "dir ${ff}" >> ${dbdir}/CONTENTS
- elif [[ -l "${f}" ]] ; then
+ elif [[ -L "${f}" ]] ; then
echo "sym ${ff} -> $(readlink ${f} ) $(stat -c '%Y' ${f} )" >> ${dbdir}/CONTENTS
else
echo "obj ${ff} $(md5sum ${f} | cut -d ' ' -f1 ) $(stat -c '%Y' ${f} )" >> ${dbdir}/CONTENTS
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 4e8542d..9854f93 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -53,6 +53,23 @@ source /sbin/functions.sh || die "Couldn't source functions.sh"
source /etc/make.globals || die "Couldn't source make.globals"
source /etc/make.conf || die "Couldn't source make.conf"
+ebuild_source_profile()
+{
+ if [[ -f ${1}/make.defaults ]] ; then
+ source ${1}/make.defaults || die "Couldn't source ${1}/make.defaults"
+ fi
+
+ if [[ -f ${1}/bashrc ]] ; then
+ source ${1}/bashrc || die "Couldn't source ${1}/bashrc"
+ fi
+
+ if [[ -f ${1}/parent ]] ; then
+ ebuild_source_profile $(readlink -f ${1}/$(< ${1}/parent) )
+ fi
+}
+
+ebuild_source_profile $(readlink -f /etc/make.profile/ )
+
ebuild_load_module()
{
source "${EBUILD_MODULES_DIR}/${1}.bash" || die "Error loading module ${1}"