[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7120/8267] eudev: Remove udev-cache



commit 44f550f392e231b7fbd1e29da3f59d6c9dd7f472
Author: Oliver Stäbler <oliver staebler bytesatwork ch>
Date:   Wed Aug 2 11:37:10 2017 +0200

    eudev: Remove udev-cache
    
    As eudev requires devtmpfs it is not necessary to keep a cache anymore
    as the kernel handles entries in /dev itself.
    
    (From OE-Core rev: 048f4149b8438c521e8b65a3c96d850a9b4a3e5b)
    
    Signed-off-by: Oliver Stäbler <oliver staebler bytesatwork ch>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/recipes-core/udev/eudev/init               |   49 ---------------
 meta/recipes-core/udev/eudev/udev-cache         |   75 -----------------------
 meta/recipes-core/udev/eudev/udev-cache.default |    5 --
 meta/recipes-core/udev/eudev_3.2.2.bb           |   20 +------
 4 files changed, 2 insertions(+), 147 deletions(-)
---
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init
index 0ab028b..0455ade 100644
--- a/meta/recipes-core/udev/eudev/init
+++ b/meta/recipes-core/udev/eudev/init
@@ -14,25 +14,7 @@ export TZ=/etc/localtime
 [ -d /sys/class ] || exit 1
 [ -r /proc/mounts ] || exit 1
 [ -x @UDEVD@ ] || exit 1
-SYSCONF_CACHED="/etc/udev/cache.data"
-SYSCONF_TMP="/dev/shm/udev.cache"
-DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen
 
-# A list of files which are used as a criteria to judge whether the udev cache could be reused.
-CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices"
-[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags"
-
-# List of files whose metadata (size/mtime/name) will be included in cached
-# system state.
-META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*"
-
-# Command to compute system configuration.
-sysconf_cmd () {
-       cat -- $CMP_FILE_LIST
-       stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}'
-}
-
-[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
 [ -f /etc/default/rcS ] && . /etc/default/rcS
 
@@ -66,37 +48,6 @@ case "$1" in
     # /var/volatile/tmp directory to be available.
     mkdir -m 1777 -p /var/volatile/tmp
 
-    # Cache handling.
-    if [ "$DEVCACHE" != "" ]; then
-            if [ -e $DEVCACHE ]; then
-                   sysconf_cmd > "$SYSCONF_TMP"
-                   if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then
-                            tar xmf $DEVCACHE -C / -m
-                            not_first_boot=1
-                            [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE"
-                            [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP"
-                            [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN"
-                    else
-                           # Output detailed reason why the cached /dev is not used
-                           cat <<EOF
-udev: Not using udev cache because of changes detected in the following files:
-udev:     $CMP_FILE_LIST
-udev:     $META_FILE_LIST
-udev: The udev cache will be regenerated. To identify the detected changes,
-udev: compare the cached sysconf at   $SYSCONF_CACHED
-udev: against the current sysconf at  $SYSCONF_TMP
-EOF
-                           touch "$DEVCACHE_REGEN"
-                    fi
-           else
-                   if [ "$ROOTFS_READ_ONLY" != "yes" ]; then
-                           # If rootfs is not read-only, it's possible that a new udev cache would be 
generated;
-                           # otherwise, we do not bother to read files.
-                           touch "$DEVCACHE_REGEN"
-                   fi
-            fi
-    fi
-
     # make_extra_nodes
     kill_udevd > "/dev/null" 2>&1
 
diff --git a/meta/recipes-core/udev/eudev_3.2.2.bb b/meta/recipes-core/udev/eudev_3.2.2.bb
index 78fef2c..47d958b 100644
--- a/meta/recipes-core/udev/eudev_3.2.2.bb
+++ b/meta/recipes-core/udev/eudev_3.2.2.bb
@@ -17,8 +17,6 @@ SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz;downloadfilena
            file://local.rules \
            file://permissions.rules \
            file://run.rules \
-           file://udev-cache \
-           file://udev-cache.default \
            file://udev.rules \
 "
 UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases";
@@ -40,14 +38,7 @@ PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
 do_install_append() {
        install -d ${D}${sysconfdir}/init.d
        install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
-       install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
        sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
-       sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
-
-       install -d ${D}${sysconfdir}/default
-       install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
-
-       touch ${D}${sysconfdir}/udev/cache.data
 
        install -d ${D}${sysconfdir}/udev/rules.d
        install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
@@ -59,14 +50,10 @@ do_install_append() {
        rm -f ${D}${base_libdir}/udev/hid2hci
 }
 
-INITSCRIPT_PACKAGES = "eudev udev-cache"
-INITSCRIPT_NAME_eudev = "udev"
-INITSCRIPT_PARAMS_eudev = "start 04 S ."
-INITSCRIPT_NAME_udev-cache = "udev-cache"
-INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
 
 PACKAGES =+ "libudev"
-PACKAGES =+ "udev-cache"
 PACKAGES =+ "eudev-hwdb"
 
 
@@ -76,13 +63,10 @@ FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
                    ${includedir}/udev.h ${libdir}/libudev.la \
                    ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
 FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
 FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
 
 RDEPENDS_eudev-hwdb += "eudev"
 
-RRECOMMENDS_${PN} += "udev-cache"
-
 RPROVIDES_${PN} = "hotplug udev"
 RPROVIDES_eudev-hwdb += "udev-hwdb"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]