]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts/oe-setup-builddir: migrate build/conf/templateconf.cfg to new template locations
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 1 Sep 2022 14:23:28 +0000 (16:23 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Sep 2022 14:54:45 +0000 (15:54 +0100)
This is done only for default oe-core/poky templates; for anything
else the locations themselves need to be migrated first, and there
is no way to tell where they would be.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
scripts/oe-setup-builddir

index 5b7d92089c3a05c607de3be429c4ab1afb5ff472..728242901c144a0360f10b347851cc5a9a62a065 100755 (executable)
@@ -40,6 +40,12 @@ cd "$BUILDDIR"
 
 if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then
     TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg")
+    # The following two are no longer valid; unsetting them will automatically get them replaced
+    # with correct ones.
+    if [ $TEMPLATECONF = "meta/conf" -o $TEMPLATECONF = "meta-poky/conf" ]; then
+        unset TEMPLATECONF
+        rm $BUILDDIR/conf/templateconf.cfg
+    fi
 fi
 
 . "$OEROOT"/.templateconf