diff options
author | Richard Tollerton <rich.tollerton@ni.com> | 2014-08-22 16:30:48 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-23 23:01:58 +0100 |
commit | 8c423bf995dc829c4bbb286e5f1c020fc053e6fc (patch) | |
tree | 2429cec5ebff1c03aca5003ce5681fdd437de03c /meta/recipes-core/udev | |
parent | bd7fb7c3ca50b3eea2d173487f24b3006470f6df (diff) | |
download | poky-8c423bf995dc829c4bbb286e5f1c020fc053e6fc.tar.gz |
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.
(From OE-Core rev: 571df6ddba1caa6805f7c96cd592eea399c2aee2)
Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r-- | meta/recipes-core/udev/udev/udev-cache | 3 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev/udev-cache.default | 2 |
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 | |||
27 | if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then | 27 | if [ "$DEVCACHE" != "" -a -e /dev/shm/udev.cache ]; then |
28 | echo "Populating dev cache" | 28 | echo "Populating dev cache" |
29 | (cd /; tar cf "${DEVCACHE_TMP}" dev) | 29 | (cd /; tar cf "${DEVCACHE_TMP}" dev) |
30 | mv -f "${DEVCACHE_TMP}" "$DEVCACHE" | 30 | gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" |
31 | rm -f "${DEVCACHE_TMP}" | ||
31 | mv /dev/shm/udev.cache /etc/udev/cache.data | 32 | mv /dev/shm/udev.cache /etc/udev/cache.data |
32 | fi | 33 | fi |
33 | 34 | ||
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 @@ | |||
1 | # Default for /etc/init.d/udev | 1 | # Default for /etc/init.d/udev |
2 | 2 | ||
3 | # Comment this out to disable device cache | 3 | # Comment this out to disable device cache |
4 | DEVCACHE="/etc/dev.tar" | 4 | DEVCACHE="/etc/dev.tar.gz" |
5 | PROBE_PLATFORM_BUS="yes" | 5 | PROBE_PLATFORM_BUS="yes" |