[12/20] udev-cache: fix timestamp errors on systems lacking an RTC

Submitted by Ben Shelton on Aug. 4, 2014, 6:41 p.m.


Message ID 17dc769adb9aef8b1cdb1f298874d482f0337ad3.1407177403.git.ben.shelton@ni.com
State New
Headers show

Commit Message

Ben Shelton Aug. 4, 2014, 6:41 p.m.
From: Richard Tollerton <rich.tollerton@ni.com>

If the system lacks an RTC, the time will typically start from the
epoch, and may get set to the "correct" time later (if at all).
In this circumstance, the timestamps in the cache tarball will always be
in the future. gnutar complains bitterly about this.

To work around this, use `tar -m` to strip mtimes during extract.

Natinst-Rally-ID: TA44427
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Natinst-ReviewBoard-ID: 58620
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
 meta/recipes-core/udev/udev/udev-cache.default | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
index 30d7faa..554142a 100644
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -7,7 +7,8 @@  DEVCACHE_SYSCONF="/etc/udev/cache.data"
 # - Avoid /dev/log because it's a pipe.
+# - Don't restore mtimes. Avoids errors on systems lacking an RTC.
+DEVCACHE_EXTRACT_OPTS="--exclude=log -m"