]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: drop S = WORKDIR workaround
authorAdrian Freihofer <adrian.freihofer@gmail.com>
Sun, 22 Sep 2024 15:43:14 +0000 (17:43 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 30 Sep 2024 15:54:15 +0000 (16:54 +0100)
Dropping support for S = WORKDIR allows to drop this ugly workaround.

With S = WORKDIR it was possible to refer to a file via oe-local-files
symlink or via direct file path. Ensuring the pseudo database is
consistent for both paths was extra complicated and required this bad
function. Really nice to drop it now!

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/devtool.py
scripts/lib/devtool/ide_sdk.py

index 7d6177398091c954b17b645e1e199f93e28a6a24..1739c84853bc6284ced2d41d40e43902e49a395b 100644 (file)
@@ -2585,11 +2585,6 @@ class DevtoolIdeSdkTests(DevtoolBase):
         i_and_d_script_path = os.path.join(
             self._workspace_scripts_dir(recipe_name), i_and_d_script)
         self.assertExists(i_and_d_script_path)
-        del_script = "delete_package_dirs_" + recipe_id
-        del_script_path = os.path.join(
-            self._workspace_scripts_dir(recipe_name), del_script)
-        self.assertExists(del_script_path)
-        runCmd(del_script_path, cwd=tempdir)
 
     def _devtool_ide_sdk_qemu(self, tempdir, qemu, recipe_name, example_exe):
         """Verify deployment and execution in Qemu system work for one recipe.
index 65873b088d5729c18de7af9e878feba0fcf9c232..350a8b02ca2d52ec527c2c05af00f3ba48920233 100755 (executable)
@@ -712,42 +712,6 @@ class RecipeModified:
                     binaries.append(abs_name[d_len:])
         return sorted(binaries)
 
-    def gen_delete_package_dirs(self):
-        """delete folders of package tasks
-
-        This is a workaround for and issue with recipes having their sources
-        downloaded as file://
-        This likely breaks pseudo like:
-        path mismatch [3 links]: ino 79147802 db
-        .../build/tmp/.../cmake-example/1.0/package/usr/src/debug/
-                             cmake-example/1.0-r0/oe-local-files/cpp-example-lib.cpp
-        .../build/workspace/sources/cmake-example/oe-local-files/cpp-example-lib.cpp
-        Since the files are anyway outdated lets deleted them (also from pseudo's db) to workaround this issue.
-        """
-        cmd_lines = ['#!/bin/sh']
-
-        # Set up the appropriate environment
-        newenv = dict(os.environ)
-        for varvalue in self.fakerootenv.split():
-            if '=' in varvalue:
-                splitval = varvalue.split('=', 1)
-                newenv[splitval[0]] = splitval[1]
-
-        # Replicate the environment variables from bitbake
-        for var, val in newenv.items():
-            if not RecipeModified.is_valid_shell_variable(var):
-                continue
-            cmd_lines.append('%s="%s"' % (var, val))
-            cmd_lines.append('export %s' % var)
-
-        # Delete the folders
-        pkg_dirs = ' '.join([os.path.join(self.workdir, d) for d in [
-            "package", "packages-split", "pkgdata", "sstate-install-package", "debugsources.list", "*.spec"]])
-        cmd = "%s rm -rf %s" % (self.fakerootcmd, pkg_dirs)
-        cmd_lines.append('%s || { "%s failed"; exit 1; }' % (cmd, cmd))
-
-        return self.write_script(cmd_lines, 'delete_package_dirs')
-
     def gen_deploy_target_script(self, args):
         """Generate a script which does what devtool deploy-target does
 
@@ -785,8 +749,6 @@ class RecipeModified:
         """Generate a script which does install and deploy"""
         cmd_lines = ['#!/bin/bash']
 
-        cmd_lines.append(self.gen_delete_package_dirs())
-
         # . oe-init-build-env $BUILDDIR
         # Note: Sourcing scripts with arguments requires bash
         cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % (