Message ID | f9ac20b69b1bfd3f77ef.1362169598@BEANTN0L019720 |
---|---|
State | Accepted |
Commit | 3b681efa4c2910c020662c1510efb4ee17008a17 |
Headers | show |
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:
Thomas> When using rsync to import package sources (typically with
Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
Thomas> are under version control, and contain directories like .git,
Thomas> .hg, etc.
Thomas> Depending on the project, these directories can become pretty large
Thomas> and typically have a lot of files. Moreover, they are not necessary
Thomas> in the context of building the package. Therefore, this commit adds
Thomas> the --cvs-exclude option to the rsync call, saving both disk space
Thomas> and sync time.
I don't personally use this, but doesn't that break stuff using the
version info (like E.G. the kernel storing the git id)?
Thomas> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Thomas> ---
Thomas> package/pkg-generic.mk | 2 +-
Thomas> 1 files changed, 1 insertions(+), 1 deletions(-)
Thomas> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
Thomas> --- a/package/pkg-generic.mk
Thomas> +++ b/package/pkg-generic.mk
Thomas> @@ -62,7 +62,7 @@ endif
Thomas> $(BUILD_DIR)/%/.stamp_rsynced:
Thomas> @$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
Thomas> @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
Thomas> - rsync -au $(SRCDIR)/ $(@D)
Thomas> + rsync -au --cvs-exclude $(SRCDIR)/ $(@D)
Thomas> $(Q)touch $@
Thomas> # Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
Thomas> _______________________________________________
Thomas> buildroot mailing list
Thomas> buildroot@busybox.net
Thomas> http://lists.busybox.net/mailman/listinfo/buildroot
On Mon, Mar 4, 2013 at 9:04 PM, Peter Korsgaard <jacmet@uclibc.org> wrote: >>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes: > > Thomas> When using rsync to import package sources (typically with > Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources > Thomas> are under version control, and contain directories like .git, > Thomas> .hg, etc. > > Thomas> Depending on the project, these directories can become pretty large > Thomas> and typically have a lot of files. Moreover, they are not necessary > Thomas> in the context of building the package. Therefore, this commit adds > Thomas> the --cvs-exclude option to the rsync call, saving both disk space > Thomas> and sync time. > > I don't personally use this, but doesn't that break stuff using the > version info (like E.G. the kernel storing the git id)? Hmm, it probably will. Are people actually relying on this when using local.mk? I have always thought of local.mk to be a personal developer way of working, not something you'd rely on for a real project. In these cases, I'd define the version number in the defconfig. Input from other users could be welcome here. If needed, we can make this a configurable option? Best regards, Thomas
On 03/04/13 21:04, Peter Korsgaard wrote: >>>>>> >>>>>"Thomas" == Thomas De Schampheleire<patrickdepinguin+buildroot@gmail.com> writes: > Thomas> When using rsync to import package sources (typically with > Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources > Thomas> are under version control, and contain directories like .git, > Thomas> .hg, etc. > > Thomas> Depending on the project, these directories can become pretty large > Thomas> and typically have a lot of files. Moreover, they are not necessary > Thomas> in the context of building the package. Therefore, this commit adds > Thomas> the --cvs-exclude option to the rsync call, saving both disk space > Thomas> and sync time. > > I don't personally use this, but doesn't that break stuff using the > version info (like E.G. the kernel storing the git id)? Depends on what you call breaking. The kernel will find buildroot's git ID, which is fine by me (that's of course assuming the output directory is a subdirectory of the buildroot directory). Or failing that, it will use the plain version number. The latter is actually what I prefer, because it means I can easily exchange modules with the non-OVERRIDE'n kernel. Regards, Arnout
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Hi, >> I don't personally use this, but doesn't that break stuff using the >> version info (like E.G. the kernel storing the git id)? Arnout> Depends on what you call breaking. The kernel will find Arnout> buildroot's git ID, which is fine by me (that's of course Arnout> assuming the output directory is a subdirectory of the Arnout> buildroot directory). Or failing that, it will use the plain Arnout> version number. The latter is actually what I prefer, because Arnout> it means I can easily exchange modules with the non-OVERRIDE'n Arnout> kernel. Ok, but it will atleast change the current behaviour, which people might rely on.. What do others say?
Dear Peter Korsgaard, On Sun, 10 Mar 2013 23:45:13 +0100, Peter Korsgaard wrote: > Ok, but it will atleast change the current behaviour, which people might > rely on.. > > What do others say? If the per-package out-of-tree stuff is merged, then in most cases, it will no longer be needed to do this rsync, except for packages that don't support out-of-tree build. As far as the actual code goes, I would find it ok that the .git/.svn stuff is not copied. It's pretty big, and 'breaks' only this very specific 'commit ID' thing, so I would tend to agree with Thomas's patch. Thomas
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:
Thomas> When using rsync to import package sources (typically with
Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
Thomas> are under version control, and contain directories like .git,
Thomas> .hg, etc.
Thomas> Depending on the project, these directories can become pretty large
Thomas> and typically have a lot of files. Moreover, they are not necessary
Thomas> in the context of building the package. Therefore, this commit adds
Thomas> the --cvs-exclude option to the rsync call, saving both disk space
Thomas> and sync time.
It seems the agreement is that people don't mind the missing
.git/.svn/.. files, so committed - Thanks.
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -62,7 +62,7 @@ endif $(BUILD_DIR)/%/.stamp_rsynced: @$(call MESSAGE,"Syncing from source dir $(SRCDIR)") @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1) - rsync -au $(SRCDIR)/ $(@D) + rsync -au --cvs-exclude $(SRCDIR)/ $(@D) $(Q)touch $@ # Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
When using rsync to import package sources (typically with PKG_OVERRIDE_SRCDIR), it often happens that these external sources are under version control, and contain directories like .git, .hg, etc. Depending on the project, these directories can become pretty large and typically have a lot of files. Moreover, they are not necessary in the context of building the package. Therefore, this commit adds the --cvs-exclude option to the rsync call, saving both disk space and sync time. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> --- package/pkg-generic.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)