Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/pkg-generic.mk: add --delete to rsync
Date: Fri, 10 Oct 2014 12:36:59 +0200	[thread overview]
Message-ID: <20141010123659.187fd60d@free-electrons.com> (raw)
In-Reply-To: <1412932487-25373-1-git-send-email-alvaro.gamez@hazent.com>

Dear Alvaro G. M,

On Fri, 10 Oct 2014 11:14:47 +0200, Alvaro G. M wrote:
> When a source overriden package is built and then its source code is modified
> and rebuilt with make package-rebuild, it is needed for the build directory
> to contain exactly the same source that is in the original directory,
> so rsync must not only copy missing files, but also remove those that existed
> previously but now don't.
> 
> Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
> ---
>  package/pkg-generic.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index f09f83e..440a750 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -117,7 +117,7 @@ $(BUILD_DIR)/%/.stamp_rsynced:
>  	@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
>  	@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
>  	$(foreach hook,$($(PKG)_PRE_RSYNC_HOOKS),$(call $(hook))$(sep))
> -	rsync -au $(RSYNC_VCS_EXCLUSIONS) $(SRCDIR)/ $(@D)
> +	rsync --delete -au $(RSYNC_VCS_EXCLUSIONS) $(SRCDIR)/ $(@D)
>  	$(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep))
>  	$(Q)touch $@

I don't remember how rsync behave exactly, but wouldn't this also
remove object files, shared libraries and executables that will have
been built in $(@D) ?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-10-10 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10  9:14 [Buildroot] [PATCH 1/1] package/pkg-generic.mk: add --delete to rsync Alvaro G. M
2014-10-10 10:36 ` Thomas Petazzoni [this message]
2014-10-10 10:45   ` Alvaro Gamez
2014-10-10 13:33     ` Thomas Petazzoni
2014-10-12 16:26 ` Thomas Petazzoni
2014-10-12 16:37   ` Alvaro Gamez
2014-10-12 16:55     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141010123659.187fd60d@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox