In the "devtool hands-on lab", we try to run "devtool finish nano ../layers/meta-foo": devtool finish nano ../layers/meta-foo NOTE: Starting bitbake server... ERROR: Source tree is not clean: M INSTALL M Makefile.in M aclocal.m4 M compile M config.guess M config.h.in M config.rpath M config.sub M configure M depcomp M doc/Makefile.in M doc/texinfo.tex M install-sh M lib/Makefile.in M m4/Makefile.in D m4/gettext.m4 D m4/iconv.m4 D m4/lib-ld.m4 D m4/lib-link.m4 D m4/lib-prefix.m4 D m4/nls.m4 D m4/po.m4 D m4/progtest.m4 M missing M po/Makefile.in.in M po/Makevars M src/Makefile.in M syntax/Makefile.in ?? autom4te.cache/ ?? config.h.in~ ?? po/remove-potcdate.sed Ensure you have committed your changes or use -f/--force if you are sure there's nothing that needs to be committed Then, if we add "-f" as suggested to "devtool finish", the command is successful, but ends up with a recipe with the above generated files: SRC_URI = "https://www.nano-editor.org/dist/v9/nano-${PV}.tar.gz \ file://INSTALL \ file://Makefile.in \ file://aclocal.m4 \ file://compile \ file://config.guess \ file://config.h.in \ file://config.rpath \ file://config.sub \ file://configure \ file://depcomp \ file://doc/Makefile.in \ file://doc/texinfo.tex \ file://install-sh \ file://lib/Makefile.in \ file://m4/Makefile.in \ file://missing \ file://po/Makefile.in.in \ file://po/Makevars \ file://src/Makefile.in \ file://syntax/Makefile.in \ " That's definitely wrong!
A workaround to make "devtool finish" work: pushd workspace/sources/nano/ git restore . git clean -fdx popd