Bug 16539

Summary: devtool finish -f adds generated files
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Michael Opdenacker <michael.opdenacker>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Undecided CC: ccasciato, meta.mr.watcher, meta.watcher
Version: 6.1   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Michael Opdenacker 2026-11-29 13:08:41 UTC
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!
Comment 1 Michael Opdenacker 2026-11-29 13:09:08 UTC
A workaround to make "devtool finish" work:

pushd workspace/sources/nano/
git restore .
git clean -fdx
popd