[Buildroot] [PATCH 1/1] package/pkg-utils: only overwrite newer for per-package-rsync
James Hilliard
james.hilliard1 at gmail.com
Sun Oct 24 05:28:52 UTC 2021
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 <james.hilliard1 at gmail.com>
---
package/pkg-utils.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index ae3c7f9da9..5af34d4ee0 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -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
--
2.25.1
More information about the buildroot
mailing list