From 937fb6a41f55132982aba1308aed4fe3f9b82be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 8 Jul 2016 12:50:52 +0200 Subject: [PATCH] base-files: remove all extra files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lock extension caused really really nasty issues. In my case I was sometimes unable to open serial ports after power up. Signed-off-by: Andreas Müller --- .../base-files/base-files_3.0.14.bbappend | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/recipes-core/base-files/base-files_3.0.14.bbappend b/recipes-core/base-files/base-files_3.0.14.bbappend index 09bc800..e479205 100644 --- a/recipes-core/base-files/base-files_3.0.14.bbappend +++ b/recipes-core/base-files/base-files_3.0.14.bbappend @@ -1,20 +1,27 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# Original: volatiles = "cache run log lock tmp" -# We don't any of those in volatiles, so: -volatiles = "" -dirs755 += "${localstatedir}/cache \ - ${localstatedir}/log \ - ${localstatedir}/lock \ - ${localstatedir}/lock/subsys \ - ${localstatedir}/tmp \ - ${localstatedir}/volatile/tmp \ - /run \ - " - BASEFILESISSUEINSTALL = "do_install_angstromissue" +# In previous versions of base-files, /run was a softlink to /var/run and the +# directory was located in /var/volatlie/run. Also, /var/lock was a softlink +# to /var/volatile/lock which is where the real directory was located. Now, +# /run and /run/lock are the real directories. If we are upgrading, we may +# need to remove the symbolic links first before we create the directories. +# Otherwise the directory creation will fail and we will have circular symbolic +# links. +# +pkg_preinst_${PN} () { + #!/bin/sh -e + if [ x"$D" = "x" ]; then + rm -rf /var/lock + + if [ -h "/run" ]; then + # Remove the symbolic link + rm -f /run + fi + fi +} + do_install_angstromissue () { echo ${MACHINE} > ${D}${sysconfdir}/hostname