summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-08-22 16:30:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-23 23:01:34 +0100
commit571df6ddba1caa6805f7c96cd592eea399c2aee2 (patch)
treef25f07ec0d2c04bb9212c8884e9f4bc3b18a990e /meta/recipes-core
parent5dbf43fe32a1cf259f9379a7d2c008260eabf3ac (diff)
downloadopenembedded-core-571df6ddba1caa6805f7c96cd592eea399c2aee2.tar.gz
openembedded-core-571df6ddba1caa6805f7c96cd592eea399c2aee2.tar.bz2
openembedded-core-571df6ddba1caa6805f7c96cd592eea399c2aee2.zip
udev-cache: Compress the cache
$DEVCACHE is observed to be 100k uncompressed; compressing it reduces its size to ~5k. But compress it outside of `tar` so that archival operation takes as little time as possible, to minimize the risk of devices being created/removed during execution. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/udev/udev/udev-cache3
-rw-r--r--meta/recipes-core/udev/udev/udev-cache.default2
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache
index c08cef2eed..ec07f50cc0 100644
--- a/meta/recipes-core/udev/udev/udev-cache
+++ b/meta/recipes-core/udev/udev/udev-cache
@@ -27,7 +27,8 @@ fi
if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then
echo "Populating dev cache"
(cd /; tar cf "${DEVCACHE_TMP}" dev)
- mv -f "${DEVCACHE_TMP}" "$DEVCACHE"
+ gzip < "${DEVCACHE_TMP}" > "$DEVCACHE"
+ rm -f "${DEVCACHE_TMP}"
mv /dev/shm/udev.cache /etc/udev/cache.data
fi
diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default
index 20933361a9..909ec8784d 100644
--- a/meta/recipes-core/udev/udev/udev-cache.default
+++ b/meta/recipes-core/udev/udev/udev-cache.default
@@ -1,5 +1,5 @@
# Default for /etc/init.d/udev
# Comment this out to disable device cache
-DEVCACHE="/etc/dev.tar"
+DEVCACHE="/etc/dev.tar.gz"
PROBE_PLATFORM_BUS="yes"