diff mbox

[4,of,4,v2] manual: add some info on the POST_RSYNC hook

Message ID 5373a0083b692806e5b6.1383820884@argentina
State Accepted
Commit fcdbeba035796c019348a7ac4ffdd32825ad4669
Headers show

Commit Message

Thomas De Schampheleire Nov. 7, 2013, 10:41 a.m. UTC
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
v2: rsync is also used for site method 'local' (comment ThomasP on IRC)

 docs/manual/adding-packages-hooks.txt |  20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

Comments

Samuel Martin Nov. 7, 2013, 10:54 a.m. UTC | #1
2013/11/7 Thomas De Schampheleire <patrickdepinguin@gmail.com>

> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
Acked-by: "Samuel Martin" <s.martin49@gmail.com>


>
> ---
> v2: rsync is also used for site method 'local' (comment ThomasP on IRC)
>
>  docs/manual/adding-packages-hooks.txt |  20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/docs/manual/adding-packages-hooks.txt
> b/docs/manual/adding-packages-hooks.txt
> --- a/docs/manual/adding-packages-hooks.txt
> +++ b/docs/manual/adding-packages-hooks.txt
> @@ -39,3 +39,23 @@ endef
>
>  LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
>  ----------------------
> +
> +Using the +POST_RSYNC+ hook
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +The +POST_RSYNC+ hook is run only for packages that use a local source,
> +either through the +local+ site method or the +OVERRIDE_SRCDIR+
> +mechanism. In this case, package sources are copied using +rsync+ from
> +the local location into the buildroot build directory. The +rsync+
> +command does not copy all files from the source directory, though.
> +Files belonging to a version control system, like the directories
> ++.git+, +.hg+, etc. are not copied. For most packages this is
> +sufficient, but a given package can perform additional actions using
> +the +POST_RSYNC+ hook.
> +
> +In principle, the hook can contain any command you want. One specific
> +use case, though, is the intentional copying of the version control
> +directory using +rsync+. The +rsync+ command you use in the hook can,
> among
> +others, use the following variables:
> +
> +* +$(SRCDIR)+: the path to the overridden source directory
> +* +$(@D)+: the path to the build directory
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
diff mbox

Patch

diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
--- a/docs/manual/adding-packages-hooks.txt
+++ b/docs/manual/adding-packages-hooks.txt
@@ -39,3 +39,23 @@  endef
 
 LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
 ----------------------
+
+Using the +POST_RSYNC+ hook
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The +POST_RSYNC+ hook is run only for packages that use a local source,
+either through the +local+ site method or the +OVERRIDE_SRCDIR+
+mechanism. In this case, package sources are copied using +rsync+ from
+the local location into the buildroot build directory. The +rsync+
+command does not copy all files from the source directory, though.
+Files belonging to a version control system, like the directories
++.git+, +.hg+, etc. are not copied. For most packages this is
+sufficient, but a given package can perform additional actions using
+the +POST_RSYNC+ hook.
+
+In principle, the hook can contain any command you want. One specific
+use case, though, is the intentional copying of the version control
+directory using +rsync+. The +rsync+ command you use in the hook can, among
+others, use the following variables:
+
+* +$(SRCDIR)+: the path to the overridden source directory
+* +$(@D)+: the path to the build directory