Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-utils: only overwrite newer for per-package-rsync
@ 2021-10-24  5:28 James Hilliard
  2021-10-24 13:02 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: James Hilliard @ 2021-10-24  5:28 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

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@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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/pkg-utils: only overwrite newer for per-package-rsync
  2021-10-24  5:28 [Buildroot] [PATCH 1/1] package/pkg-utils: only overwrite newer for per-package-rsync James Hilliard
@ 2021-10-24 13:02 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-10-24 13:02 UTC (permalink / raw)
  To: James Hilliard; +Cc: Herve Codina, Yann E. MORIN, buildroot

Hello James,

On Sat, 23 Oct 2021 23:28:52 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:

> 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@gmail.com>

There's an entire patch series from Hervé Codina at
https://lore.kernel.org/buildroot/20210817083930.3718711-1-herve.codina@bootlin.com/
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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-24 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-24  5:28 [Buildroot] [PATCH 1/1] package/pkg-utils: only overwrite newer for per-package-rsync James Hilliard
2021-10-24 13:02 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox