]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel, license, sstate, rootfs.py: Remove deploy directory README
authorMike Crowe <mac@mcrowe.com>
Tue, 14 Feb 2017 14:20:02 +0000 (14:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2017 22:43:43 +0000 (23:43 +0100)
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file in the deploy directory warrants the complexity it brings elsewhere.
Let's just remove it entirely.

In particular, if two do_image_complete tasks run in parallel they risk
both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time.
Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
file. In theory this should be safe because "cp -alf" will just cause one
to overwrite the other. Unfortunately, coreutils cp also has a race[1]
which means that if one copy creates the file at just the wrong point the
other will fail with:

 cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to
+‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680

(From OE-Core rev: 71e9e88847d7000781642ea6187ebd8f40dfdcfe)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass
meta/classes/license.bbclass
meta/classes/sstate.bbclass
meta/files/deploydir_readme.txt [deleted file]
meta/lib/oe/rootfs.py

index d07f69c5ce9b3a5cd5c4321266d863f0de0e6743..eefe574a60cbeedc2fdabff5b7ed911c5efc85ba 100644 (file)
@@ -607,8 +607,6 @@ kernel_do_deploy() {
                ln -sf ${base_name}.bin ${DEPLOYDIR}/${type}
        done
 
-       cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
-
        cd ${B}
        # Update deploy directory
        for type in ${KERNEL_IMAGETYPES} ; do
index 660b85f6195e1d4767c7602e1b0ce1d5cb539d98..721343d0f45f55f07d21a72cb7f1179ad021905c 100644 (file)
@@ -279,7 +279,7 @@ def get_deployed_files(man_file):
     """
 
     dep_files = []
-    excluded_files = ["README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"]
+    excluded_files = []
     with open(man_file, "r") as manifest:
         all_files = manifest.read()
     for f in all_files.splitlines():
index e2bc7355b4d534db806f3b1580f536fc051bcd8b..5b92c5485a28136f1df0e3397092009cfdd61bcd 100644 (file)
@@ -30,8 +30,6 @@ SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
 # Archive the sources for many architectures in one deploy folder
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
-# Ignore overlapping README
-SSTATE_DUPWHITELIST += "${DEPLOY_DIR}/sdk/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"
 
 SSTATE_SCAN_FILES ?= "*.la *-config *_config"
 SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
diff --git a/meta/files/deploydir_readme.txt b/meta/files/deploydir_readme.txt
deleted file mode 100644 (file)
index 97ec185..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Files in the deploy directory will not be re-created automatically if you
-delete them. If you do delete a file, you will need to run:
-
-  bitbake -c clean TARGET
-  bitbake TARGET
-
-where TARGET is the name of the appropriate package or target e.g.
-"virtual/kernel" for the kernel, an image, etc.
index c4a5086bec07a085cd6e2e6e6ddec4eb2db672b7..f96788399f7cd3acfd403e9b6b5a415123d8b8c4 100644 (file)
@@ -186,10 +186,6 @@ class Rootfs(object, metaclass=ABCMeta):
 
         shutil.copytree(postinst_intercepts_dir, intercepts_dir)
 
-        shutil.copy(self.d.expand("${COREBASE}/meta/files/deploydir_readme.txt"),
-                    self.deploydir +
-                    "/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt")
-
         execute_pre_post_process(self.d, pre_process_cmds)
 
         if self.progress_reporter: