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

Ben Shelton ben.shelton at ni.com
Mon Aug 4 18:41:04 UTC 2014


From: Richard Tollerton <rich.tollerton at 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 at ni.com>
Natinst-ReviewBoard-ID: 58620
Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
---
 meta/recipes-core/udev/udev/udev-cache.default | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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"
 DEVCACHE_CURRENT_SYSCONF="/dev/shm/udev.cache"
 
 # - Avoid /dev/log because it's a pipe.
-DEVCACHE_EXTRACT_OPTS="--exclude=log"
+# - Don't restore mtimes. Avoids errors on systems lacking an RTC.
+DEVCACHE_EXTRACT_OPTS="--exclude=log -m"
 DEVCACHE_CREATE_OPTS="--exclude=log"
 
 PROBE_PLATFORM_BUS="yes"
-- 
2.0.4




More information about the Openembedded-core mailing list