Paul Spooren <m...@aparcar.org> [2020-03-03 17:02:07]: > On 02.03.20 23:12, Petr Štetiar wrote: > > Paul Spooren <m...@aparcar.org> [2020-03-02 16:19:05]: > > > > > - .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) > > > > > > [...] > > > > > > $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call > > > IMAGE_NAME,$(1),$(2)) > > > - cp $$^ $$@ > > > + -cp $$^ $$@ > > > > > > The prefixed dash ignores a failure. > > > This change seems like a band-aid as I really don't see a reason to touch > > the > > existing code just because you've put the JSON generation in that place > > initially. > > How about I create an independent patch like the following? > > [ -f $$^ ] && cp $$^ $$@ || true > > It seems to be bad style ignoring cp errors, what if the destination is no > longer writable or storage full? This way we can remove the .IGNORE.
I don't know the original intention of the .IGNORE, so I just assume, that it's there because some of the targets abuse the image generation code for stuff like DTBs or other artifacts. So I'm not sure, whether this misuse means broken only source file/dir or it might mean problem with the destination file/dir as well. This would probably need more checks (and testing) so it might be probably better to bite the bullet and fix the targets causing the problems and fix them, then removing the .IGNORE altogether without any other additional band-aids. -- ynezz _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel