[OE-core] [PATCH 15/20] udev-cache: don't attempt to extract cache if it doesn't exist
Ben Shelton
ben.shelton at ni.com
Mon Aug 4 18:41:07 UTC 2014
From: Richard Tollerton <rich.tollerton at ni.com>
If you try to invalidate the udev cache solely by deleting the tarball,
while forgetting to also remove the config file ($DEVCACHE_SYSCONF),
then tar will fail.
Fortunately the cache will get regenerated on this boot because
$DEVCACHE_CURRENT_SYSCONF still exists, but to avoid the error, we
should check to see if the tarball actually exists before we try to
extract it.
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/init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index dc39d95..e4a196f 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -68,7 +68,7 @@ case "$1" in
NEWDATA="$READDATA"
readfiles "$DEVCACHE_SYSCONF"
OLDDATA="$READDATA"
- if [ "$OLDDATA" = "$NEWDATA" ]; then
+ if [ "$OLDDATA" = "$NEWDATA" -a -f "$DEVCACHE" ]; then
tar xzf $DEVCACHE -C / $DEVCACHE_EXTRACT_OPTS
not_first_boot=1
[ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
--
2.0.4
More information about the Openembedded-core
mailing list