[Buildroot] buildroot packages from svn repo fail

Yann E. MORIN yann.morin.1998 at free.fr
Fri Feb 19 20:34:31 UTC 2021


Vincent, All,

(sorry for the duplicate, IO forgot to re-add the list in this reply)

On 2021-02-18 21:04 -0600, Vincent Fazio spake thusly:
> The fix may be as simple as:
> 
> diff --git a/support/download/svn b/support/download/svn
> index 839dccaf62..386507ecb5 100755
> --- a/support/download/svn
> +++ b/support/download/svn
> @@ -52,6 +52,9 @@ _svn export ${verbose} "${@}" "'${uri}@${rev}'" "'${basename}'"
>  # last line (svn outputs everything on stdout)
>  date="$( _svn info --show-item last-changed-date "'${uri}@${rev}'" |tail -n 1 )"
> 
> +# Drop sub-second precision to play nice with tar's valid_timespec check
> +date="$(date -d "${date}" -uIseconds)"

This looks nice, but do you know how long 'date' has supported
sub-second precision in the input timestamp?

I think a more robust solution would be to sed-out the sub-second part,
and do that as a single command:

    date="$( _svn info --show-item last-changed-date "'${uri}@${rev}'" \
             |tail -n 1 \
             |sed -r -e 's/\.[[:digit:]]+//'
           )" 

Also, while testing this, I noticed that not all svn version support the
--show-item option. For example, the version I have on my autobuilder
does not support it:

    $ svn --version
    svn, version 1.8.8 (r1568071)
    [...]

    $ svn info --show-item last-changed-date svn://localhost:3690/foo
    svn: invalid option: --show-item

Maybe we should drop it, and revert to sed-ing the required field out
from the whole 'info output... Thoughts?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list