Skip to contentSkip to conversation

setup-environment: Move DL_DIR setting to local.conf

PATCH New Otavio Salvador 1 participant 2 messages Nov 1, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 setup-environment: Move DL_DIR setting to local.conf

This improves user-friendness as it makes clear where it is storing the downloads cache.

Change-Id Iedd2d22b938ea192dda96ef2c80a716d6796e53f
---
 conf/site.conf    | 5 -----
 setup-environment | 2 ++
 2 files changed, 2 insertions(+), 5 deletions(-)
 delete mode 100644 conf/site.conf
conf/site.conf deleted +0 -5
deleted file mode 100644
index e7f94b1..0000000
@@ -1,5 +0,0 @@
-SCONF_VERSION = "1"
-
-BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"
-
-DL_DIR = "${BSPDIR}/downloads/"
setup-environment +2 -0
index 2583fe3..3d071ab 100644
@@ -145,6 +145,8 @@ if [ ! -e conf/local.conf.sample ]; then
 
 BB_NUMBER_THREADS = '$NCPU'
 PARALLEL_MAKE = '-j $NCPU'
+
+DL_DIR ?= "\${BSPDIR}/downloads/"
 EOF
     # Change settings according environment
     sed -e "s,MACHINE ??=.*,MACHINE ??= '$MACHINE',g" \
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 2/2 setup-environment: Allow user to provide a site.conf

The site.conf file is intended to provide configuration which is used by default in the site where it is building.

There are several uses as:

- override DL_DIR for a company shared cache;
- set proxy value for GIT;
- etc...

Change-Id I36bf6c5e1c192391b996a49f54cd4f413c769cb0
---
 setup-environment | 7 +++++++
 1 file changed, 7 insertions(+)
setup-environment +7 -0
index 3d071ab..f2c91d7 100644
@@ -156,6 +156,13 @@ EOF
 
     cp $TEMPLATES/* conf/
 
+    for s in $HOME/.oe $HOME/.yocto; do
+        if [ -e $s/site.conf ]; then
+            echo "Linking $s/site.conf to conf/site.conf"
+            ln -s $s/site.conf conf
+        fi
+    done
+
     generated_config=1
 fi
 
Signature · 1 line
1.8.4.rc3