tar 1.30 reports position sensitive options and returns with an error
code. This causes the following error during barebox prepare.

        tar: The following options were used after any non-optional arguments in
        archive create or update mode.  These options are positional and affect
        only arguments that follow them.  Please, rearrange them properly.
        tar: --exclude '.svn' has no effect
        tar: --exclude '.pc' has no effect
        tar: --exclude '.git' has no effect
        tar: --exclude '*.in' has no effect
        tar: --exclude '*.in.*' has no effect
        tar: --exclude '*/*~' has no effect
        tar: Exiting with failure status due to previous errors

Reorder the arguments to tar and put the --exclude arguments before the
current directory.

Signed-off-by: Michael Tretter <michael.tret...@posteo.net>
---
 scripts/libptxdist.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh
index 433d789ea..820a02298 100644
--- a/scripts/libptxdist.sh
+++ b/scripts/libptxdist.sh
@@ -438,13 +438,14 @@ ptxd_filter_dir() {
 
        mkdir -p "${dstdir}" &&
 
-       tar -C "${srcdir}" -c . \
+       tar -c -C "${srcdir}" \
                --exclude .svn \
                --exclude .pc \
                --exclude .git \
                --exclude "*.in" \
                --exclude "*.in.*" \
                --exclude "*/*~" \
+               . \
                | tar -C "${dstdir}" -x
        check_pipe_status || return
 
-- 
2.16.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to