let it be used by normal users; store all settings in user homedir instead of global /etc

This commit is contained in:
belliash 2013-02-09 20:18:36 +01:00
parent 087d59e2d4
commit c7f4bbc56e
4 changed files with 12 additions and 12 deletions

View File

@ -10,6 +10,10 @@ BINDIR="${STOREDIR}/bin"
# builds (eg. stages). # builds (eg. stages).
BUILDDIR="${STOREDIR}/builds" BUILDDIR="${STOREDIR}/builds"
# Location of the intermediate metadata cache which is stored in a different format that
# includes eclass state.
ECACHEDIR="${STOREDIR}/cache"
# Defines the directory in which overlays with user made ebuilds will be saved for further # Defines the directory in which overlays with user made ebuilds will be saved for further
# merging with portage tree. # merging with portage tree.
OVERLAYSDIR="${STOREDIR}/overlays" OVERLAYSDIR="${STOREDIR}/overlays"

2
ezsync
View File

@ -241,7 +241,7 @@ fi
# Regenerate Portage cache # Regenerate Portage cache
printInfo "Updating constructed Portage cache..." printInfo "Updating constructed Portage cache..."
run "FEATURES="metadata-transfer" PORTDIR="${PORTAGESDIR}/${PORTAGE_BUILD[0]}" egencache --update --portdir=${PORTAGESDIR}/${PORTAGE_BUILD[0]} --jobs=${MAXJOBS} --load-average=${LOADAVERAGE} --tolerant" run "FEATURES="metadata-transfer" PORTDIR="${PORTAGESDIR}/${PORTAGE_BUILD[0]}" egencache --update --cache-dir=${ECACHEDIR} --portdir=${PORTAGESDIR}/${PORTAGE_BUILD[0]} --jobs=${MAXJOBS} --load-average=${LOADAVERAGE} --tolerant"
[ ${?} -ne 0 ] && die "EzBuild was unable to regenerate cache!" 32 [ ${?} -ne 0 ] && die "EzBuild was unable to regenerate cache!" 32
# Optionally commit all changes to remote Portage repository # Optionally commit all changes to remote Portage repository

View File

@ -11,10 +11,6 @@ function checkPrerequisites() {
printError "You are trying to launch ${EZNAME} on non-Linux system!" printError "You are trying to launch ${EZNAME} on non-Linux system!"
return 1 return 1
fi fi
if [ "${EUID}" != "0" ] && [ "${USER}" != "root" ]; then
printError "The ${EZNAME} needs to be launched from root account!"
return 1
fi
if [ ! -e /dev/null ]; then if [ ! -e /dev/null ]; then
printError "The /dev directory seems to be not mounted!" printError "The /dev directory seems to be not mounted!"
return 1 return 1
@ -174,9 +170,9 @@ function loadConfiguration() {
source ${EZROOT}/config/common.conf &> /dev/null || panic source ${EZROOT}/config/common.conf &> /dev/null || panic
source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic
source ${EZROOT}/config/layout.conf &> /dev/null || panic source ${EZROOT}/config/layout.conf &> /dev/null || panic
source /etc/ezbuild/common.conf &> /dev/null || panic source ~/.ezbuild/common.conf &> /dev/null || panic
source /etc/ezbuild/${EZNAME}.conf &> /dev/null || panic source ~/.ezbuild/${EZNAME}.conf &> /dev/null || panic
source /etc/ezbuild/layout.conf &> /dev/null || panic source ~/.ezbuild/layout.conf &> /dev/null || panic
} }
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -204,9 +200,9 @@ function loadModule() {
if [ -e ${MODULESCUSTOMDIR}/${MODULE}.conf ]; then if [ -e ${MODULESCUSTOMDIR}/${MODULE}.conf ]; then
source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null
source ${MODULESCUSTOMDIR}/${MODULE}.conf &> /dev/null source ${MODULESCUSTOMDIR}/${MODULE}.conf &> /dev/null
elif [ -e /etc/ezbuild/modules/${MODULE}.conf ]; then elif [ -e ~/.ezbuild/modules/${MODULE}.conf ]; then
source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null
source /etc/ezbuild/modules/${MODULE}.conf &> /dev/null source ~/.ezbuild/modules/${MODULE}.conf &> /dev/null
fi fi
if [ ${?} -eq 0 ]; then if [ ${?} -eq 0 ]; then
if functionExists ${FUNCTION}; then if functionExists ${FUNCTION}; then

View File

@ -122,8 +122,8 @@ function makeCleanDirectory() {
# Creates all 'core' directories necessary for EzBuild to operate # Creates all 'core' directories necessary for EzBuild to operate
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
function makeCoreDirectories() { function makeCoreDirectories() {
local DIRS="${BINDIR} ${BUILDDIR} ${LOGFILE%/*} ${OVERLAYSDIR} \ local DIRS="${BINDIR} ${BUILDDIR} ${ECACHEDIR} ${LOGFILE%/*} \
${PACKAGESDIR} ${PORTAGESDIR} ${STOREDIR} ${TEMPDIR}" ${OVERLAYSDIR} ${PACKAGESDIR} ${PORTAGESDIR} ${STOREDIR} ${TEMPDIR}"
for DIR in ${DIRS}; do for DIR in ${DIRS}; do
makeDirectory ${DIR} || return 1 makeDirectory ${DIR} || return 1
done done