All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/download/svn: fix date format for archive creation
@ 2021-02-19 21:21 Vincent Fazio
  2021-02-20  9:51 ` Yann E. MORIN
  2021-02-22 22:06 ` Yann E. MORIN
  0 siblings, 2 replies; 6+ messages in thread
From: Vincent Fazio @ 2021-02-19 21:21 UTC (permalink / raw)
  To: buildroot

Previously we would use the date provided by:
`svn info --show-item last-changed-date ...`

The date returned from this command could include sub-second precision
which is not compatible with the PAX options we specify to GNU tar.

Now the returned date is massaged to drop the sub-seconds.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
---
 support/download/svn | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/support/download/svn b/support/download/svn
index 839dccaf62..ea1032267f 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 GNU tar's valid_timespec check
+date="$( date -d "${date}" -uIseconds )"
+
 # Generate the archive.
 # We did a 'svn export' above, so it's not a working copy (there is no .svn
 # directory or file to ignore).
-- 
2.30.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-22 22:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 21:21 [Buildroot] [PATCH] support/download/svn: fix date format for archive creation Vincent Fazio
2021-02-20  9:51 ` Yann E. MORIN
2021-02-22 10:58   ` Arnout Vandecappelle
2021-02-22 18:28     ` Yann E. MORIN
2021-02-22 20:14       ` Yann E. MORIN
2021-02-22 22:06 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.