[OE-core] [PATCH 13/20] udev-cache: Avoid caching udev.cache or non-devfs filesystems

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


From: Richard Tollerton <rich.tollerton at ni.com>

If $DEVCACHE_CURRENT_SYSCONF gets stored in the cache tarball, and
extracted, then udev-cache will needlessly rebuild the cache on every
future boot. The direct fix to this is to explicitly exclude it.

Investigating this also uncovered that we're also archiving everything
under other filesystems, including /dev/cgroup, /dev/shm, etc. This
shouldn't be happening. The fix is to use `tar --one-file-system`, but
this is GNU-specific.

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
index 554142a..c71826e 100644
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -8,7 +8,8 @@ DEVCACHE_CURRENT_SYSCONF="/dev/shm/udev.cache"
 
 # - 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"
-DEVCACHE_CREATE_OPTS="--exclude=log"
+# - (gnutar specific) Stay on the same fs.
+DEVCACHE_EXTRACT_OPTS="--exclude=log -m --exclude=udev.cache --one-file-system"
+DEVCACHE_CREATE_OPTS="--exclude=log --exclude=udev.cache --one-file-system"
 
 PROBE_PLATFORM_BUS="yes"
-- 
2.0.4




More information about the Openembedded-core mailing list