Skip to contentSkip to conversation

tinfoil.py: Check if BUILDDIR exists

PATCH In review Amanda Brindle 2 participants 3 messages Jan 18, 2018 – Jan 19, 2018

lore
Share & tools
lore
#0 lore raw

cover tinfoil.py: Check if BUILDDIR exists

The following changes since commit 364f8bcfcbd04e722490f363ad36a15fb7066ba7:

linux-firmware: Bump revision to 65b1c68c (2018-01-11 10:26:07 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib abrindle/tinfoil
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=abrindle/tinfoil

Amanda Brindle (1):
tinfoil.py: Check if BUILDDIR exists

 bitbake/lib/bb/tinfoil.py | 5 +++++
 1 file changed, 5 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 tinfoil.py: Check if BUILDDIR exists

Check if BUILDDIR exists in order to deterimine if a tinfoil using script is running without having called oe-init-build-env (or similar). If not, instruct user to initialise the build environment, and then error out immediately. Before, tinfoil would hang for 30s before erroring out.

Fixes [YOCTO #12096]

---
 bitbake/lib/bb/tinfoil.py | 5 +++++
 1 file changed, 5 insertions(+)
bitbake/lib/bb/tinfoil.py +5 -0
index 368264f..e156b47 100644
@@ -372,6 +372,11 @@ class Tinfoil:
         """
         self.quiet = quiet
 
+        basepath = os.environ.get('BUILDDIR')
+        if not basepath:
+            print("Tinfoil can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
+            sys.exit(1)
+
         if self.tracking:
             extrafeatures = [bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING]
         else:
Signature · 1 line
2.7.4
#2 lore raw

✗ patchtest: failure for tinfoil.py: Check if BUILDDIR exists

In reply to Amanda Brindle

== Series Details ==

Series: tinfoil.py: Check if BUILDDIR exists
Revision: 1
URL : https://patchwork.openembedded.org/series/10609/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists [test_target_mailing_list]

  Suggested fix    Send the series again to the correct mailing list (ML)
  Suggested ML     [email protected] [http://git.openembedded.org/bitbake/]
  Patch's path:    bitbake/lib/bb/tinfoil.py

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 6b87ad5b08)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe