The correct thing to do is to simply run `lb config` after an `lb clean`. This is what the error "E: the following stage is required to be done first: config" means. I accept that the error text is perhaps not as helpful as it could be, but it relates to the architecture of the program.
Hacking the build process by creating files like `.build/config` yourself manually fundamentally risks ending up with a broken build because you're tricking the scripts into thinking that a necessary earlier script has already run when it actually has not, and thus potentially important stuff may have been skipped. Don't do that. Just because such a hack may seem to work on the surface does not necessarily mean that everything is actually okay. As I recall, having not worked on this project for a while now, `lb clean` does not actually itself destroy your config, this only happens if you have an `auto/clean` file with such instructions, as I believe the default one does. So if you don't want `lb clean` to destroy your existing generated config, you need to edit your `auto/clean` to stop it doing so. However, if you want a persistent config, the way to do that is to set it up in an `auto/config` file, which `lb clean` will never destroy. The best setup is to (1) setup your config in an `auto/config` file, (2) keep the default behaviour of `auto/clean` to delete any existing generated config, and (3) just run `lb config` after and `lb clean`, which will delete and regenerate the config. On Fri, 2021-07-30 at 15:26 -0500, p...@gilbertson.biz wrote: > Hello Debian-live-list, > > Bullseye build works great. One problem. When you "lb clean" your > build > directory the "clean" erases the "config" file in the hidden > directory > ".build" giving you the following error stopping your "lb build". > > > lb chroot_prep install all-except-archives > E: the following stage is required to be done first: config > E: An unexpected failure occurred, exiting... > P: Begin unmounting filesystems... > P: Saving caches... > Reading package lists... Done > Building dependency tree... Done > > Its an easy fix just create an new blank "config" file in ".build" > and > it works like a charm. Just FYI. > > Cheers, > > Paul >