RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.58k stars 1.61k forks source link

Multiple patch directories in same stage subdirectory don't work as expected #675

Open chrishamm opened 1 year ago

chrishamm commented 1 year ago

I spent the day trying to track down an oddity with quilt while trying to build buster, I have not yet checked if bullseye is affected as well. Suppose you have the following file structure:

When you run the build script without extra arguments, myPatch.diff is successfully applied. Unless you run the build script with CLEAN=1, the second patch myOtherPatch.diff is not applied and no error is reported. In addition, quilt reports after 01-patches that the patches from 00-patches (but not from 01-patches) have been fully applied.

I suspect the series file is just read once per stage subdirectory (maybe then stored as part of the .pc stuff?) and automatically cleared if CLEAN=1 is present. I don't think this is right, because building an image with and without CLEAN=1 leads to different builds.