Skip to contentSkip to conversation

default.xml: Keep sources/base files in sync automatically

PATCH New Tom Hochstein 1 participant 2 messages Nov 14, 2016 – Nov 15, 2016

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 setup-environment: Keep sources/base files in sync automatically

In reply to Tom Hochstein

Currently setup-environment tries to keep the files in sources/base in sync with the files copied by the manifest. When the files do get out of sync, the script fails with an error message that many users will not understand.

We avoid the sync issue in the manifest by linking to the files.

---
 setup-environment | 19 -------------------
 1 file changed, 19 deletions(-)
setup-environment +0 -19
index a04ffae..9a3bdc2 100755
@@ -135,25 +135,6 @@ if [ -e $PWD/sources/oe-core ]; then
     OEROOT=$PWD/sources/oe-core
 fi
 
-# Ensure all files in sources/base are kept in sync with project root
-updated=
-for f in $CWD/sources/base/*; do
-    file="$(basename $f)"
-    if [ "$file" = "conf" ] || echo $file | grep -q '~$'; then
-        continue
-    fi
-
-    if ! cmp -s "$file" "$f"; then
-        updated="true"
-        [ -e $file ] && chmod u+w $file
-        cp $f $file
-    fi
-done
-if [ "$updated" = "true" ]; then
-    echo "The project root content has been updated. Please run '$PROGNAME' again."
-    return
-fi
-
 . $OEROOT/oe-init-build-env $CWD/$1 > /dev/null
 
 # if conf/local.conf not generated, no need to go further
Signature · 1 line
1.9.1
#0 lore raw

PATCH 1/1 default.xml: Keep sources/base files in sync automatically

Currently sources/base/setup-environment tries to keep the files in sources/base in sync with the files copied by the manifest. When the files do get out of sync, the script fails with an error message that many users will not understand.

We avoid the sync issue by linking to the files.

Change-Id I2a4ace7aa65146bfc5decf5d4baab519e68e575b
---
 default.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
default.xml +2 -2
index 709d1ae..0585342 100644
@@ -13,8 +13,8 @@
   <project remote="oe" revision="master" name="meta-openembedded" path="sources/meta-openembedded"/>
 
   <project remote="freescale" revision="master" name="fsl-community-bsp-base" path="sources/base">
-	<copyfile dest="README" src="README"/>
-	<copyfile dest="setup-environment" src="setup-environment"/>
+	<linkfile dest="README" src="README"/>
+	<linkfile dest="setup-environment" src="setup-environment"/>
   </project>
 
   <project remote="freescale" revision="master" name="meta-freescale-3rdparty" path="sources/meta-freescale-3rdparty"/>
Signature · 1 line
1.9.1