package/pkg-utils: only overwrite newer for per-package-rsync
PATCH 1/1 package/pkg-utils: only overwrite newer for per-package-rsync
Currently during target-finalize we rsync packages in sorted order, however if one rebuilds a package that has reverse dependencies the rebuilt version may get overwritten by the old version from the reverse dependency if the reverse dependency gets recyned after the rebuilt package(based on alphabetical sorting) during the target-finalize stage.
To prevent this only copy files newer than their targets.
--- package/pkg-utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-utils.mk +1 -1
@@ -184,7 +184,7 @@ ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) define per-package-rsync mkdir -p $(3) $(foreach pkg,$(1),\ - rsync -a --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \ + rsync -au --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \ $(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \ $(3)$(sep)) endef
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello James,
Quoted 10 lines · On Sat, 23 Oct 2021 23:28:52 -0600 James Hilliard <[email protected]>…
Currently during target-finalize we rsync packages in sorted order, however if one rebuilds a package that has reverse dependencies the rebuilt version may get overwritten by the old version from the reverse dependency if the reverse dependency gets recyned after the rebuilt package(based on alphabetical sorting) during the target-finalize stage.
To prevent this only copy files newer than their targets.
Signed-off-by James Hilliard <[email protected]>
There's an entire patch series from Hervé Codina at
https://lore.kernel.org/buildroot/[email protected]/
to address this issue, and it is much more involved. Parts of the series have been applied, but not all of it, as there are some remaining issues.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot