Selaa lähdekoodia

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

Rafal Kupiec 6 vuotta sitten
vanhempi
commit
c7f4bbc56e
4 muutettua tiedostoa jossa 12 lisäystä ja 12 poistoa
  1. 4
    0
      config/layout.conf
  2. 1
    1
      ezsync
  3. 5
    9
      libraries/common
  4. 2
    2
      libraries/filesystem

+ 4
- 0
config/layout.conf Näytä tiedosto

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

+ 1
- 1
ezsync Näytä tiedosto

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

+ 5
- 9
libraries/common Näytä tiedosto

@@ -11,10 +11,6 @@ function checkPrerequisites() {
11 11
 		printError "You are trying to launch ${EZNAME} on non-Linux system!"
12 12
 		return 1
13 13
 	fi
14
-	if [ "${EUID}" != "0" ] && [ "${USER}" != "root" ]; then
15
-		printError "The ${EZNAME} needs to be launched from root account!"
16
-		return 1
17
-	fi
18 14
 	if [ ! -e /dev/null ]; then
19 15
 		printError "The /dev directory seems to be not mounted!"
20 16
 		return 1
@@ -174,9 +170,9 @@ function loadConfiguration() {
174 170
 	source ${EZROOT}/config/common.conf &> /dev/null || panic
175 171
 	source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic
176 172
 	source ${EZROOT}/config/layout.conf &> /dev/null || panic
177
-	source /etc/ezbuild/common.conf &> /dev/null || panic
178
-	source /etc/ezbuild/${EZNAME}.conf &> /dev/null || panic
179
-	source /etc/ezbuild/layout.conf &> /dev/null || panic
173
+	source ~/.ezbuild/common.conf &> /dev/null || panic
174
+	source ~/.ezbuild/${EZNAME}.conf &> /dev/null || panic
175
+	source ~/.ezbuild/layout.conf &> /dev/null || panic
180 176
 }
181 177
 
182 178
 #-------------------------------------------------------------------------------
@@ -204,9 +200,9 @@ function loadModule() {
204 200
 		if [ -e ${MODULESCUSTOMDIR}/${MODULE}.conf ]; then
205 201
 			source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null
206 202
 			source ${MODULESCUSTOMDIR}/${MODULE}.conf &> /dev/null
207
-		elif [ -e /etc/ezbuild/modules/${MODULE}.conf ]; then
203
+		elif [ -e ~/.ezbuild/modules/${MODULE}.conf ]; then
208 204
 			source ${EZROOT}/config/modules/${MODULE}.conf &> /dev/null
209
-			source /etc/ezbuild/modules/${MODULE}.conf &> /dev/null
205
+			source ~/.ezbuild/modules/${MODULE}.conf &> /dev/null
210 206
 		fi
211 207
 		if [ ${?} -eq 0 ]; then
212 208
 			if functionExists ${FUNCTION}; then

+ 2
- 2
libraries/filesystem Näytä tiedosto

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

Loading…
Peruuta
Tallenna