From 2c3920cf39c6a920340476156e1584e878d63036 Mon Sep 17 00:00:00 2001 From: lixinyu Date: Tue, 23 Jul 2024 15:39:32 +0800 Subject: [PATCH] one-click: optimize the one-click * add detection of the build directory, build directory need exist otherwise raise exception * add detection of the src/yocto-meta-openeuler, one-click function need yocto-meta-openeuler Signed-off-by: lixinyu --- src/oebuild/app/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/oebuild/app/main.py b/src/oebuild/app/main.py index c950a04..7cf350f 100644 --- a/src/oebuild/app/main.py +++ b/src/oebuild/app/main.py @@ -238,6 +238,20 @@ class QuickBuild(): ''' xxx ''' + # judge if exist src/yocto-meta-openeuler, one-click function need yocto-meta-openeuler + if not os.path.exists(Configure().source_yocto_dir()): + logger.error(""" +please clone yocto-meta-openeuler in src directory, you can exec as follows steps: + + oebuild update yocto +or + cd src + git clone + +""") + sys.exit(-1) + + os.makedirs(Configure().build_dir(), exist_ok=True) os.chdir(Configure().build_dir()) self._init_build_dir() if self.compile_param.build_in == oebuild_const.BUILD_IN_DOCKER: -- Gitee