]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqemu: validate paths and attempt to infer unset paths
authorJoshua Lock <joshua.g.lock@intel.com>
Wed, 21 Sep 2016 13:06:56 +0000 (14:06 +0100)
committerJoshua Lock <joshua.g.lock@intel.com>
Wed, 21 Sep 2016 19:02:31 +0000 (20:02 +0100)
We need to validate and ensure all paths are set regardless of
whether runqemu was invoked with a .qemuboot.conf file or
otherwise. Split this logic out into a separate method called
during check_and_set()

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
scripts/runqemu

index 08dc30692140d951d544a60f5bf443120a73a082..5170d8757073c38753ff45e26fdc49ef8638a2cd 100755 (executable)
@@ -536,6 +536,7 @@ class BaseConfig(object):
 
     def check_and_set(self):
         """Check configs sanity and set when needed"""
+        self.validate_paths()
         check_tun()
         # Check audio
         if self.audio_enabled:
@@ -598,6 +599,8 @@ class BaseConfig(object):
             k_upper = k.upper()
             self.set(k_upper, v)
 
+    def validate_paths(self):
+        """Ensure all relevant path variables are set"""
         # When we're started with a *.qemuboot.conf arg assume that image
         # artefacts are relative to that file, rather than in whatever
         # directory DEPLOY_DIR_IMAGE in the conf file points to.