diff options
author | Adrian Freihofer <adrian.freihofer@gmail.com> | 2024-09-22 17:43:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-30 17:00:50 +0100 |
commit | 21917a63abd74039dead6006cd3ef3d29915d530 (patch) | |
tree | 00c3c12e3b8de4352b37619607b2aac90a36dc05 /scripts/lib/devtool | |
parent | 8634e46b4040b6008410b6d77fecb5cbaec7e90e (diff) | |
download | poky-21917a63abd74039dead6006cd3ef3d29915d530.tar.gz |
devtool: drop S = WORKDIR workaround
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!
(From OE-Core rev: 2b799fdf267f44c26797593984d9828c4fd0fd31)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rwxr-xr-x | scripts/lib/devtool/ide_sdk.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py index 65873b088d..350a8b02ca 100755 --- a/scripts/lib/devtool/ide_sdk.py +++ b/scripts/lib/devtool/ide_sdk.py | |||
@@ -712,42 +712,6 @@ class RecipeModified: | |||
712 | binaries.append(abs_name[d_len:]) | 712 | binaries.append(abs_name[d_len:]) |
713 | return sorted(binaries) | 713 | return sorted(binaries) |
714 | 714 | ||
715 | def gen_delete_package_dirs(self): | ||
716 | """delete folders of package tasks | ||
717 | |||
718 | This is a workaround for and issue with recipes having their sources | ||
719 | downloaded as file:// | ||
720 | This likely breaks pseudo like: | ||
721 | path mismatch [3 links]: ino 79147802 db | ||
722 | .../build/tmp/.../cmake-example/1.0/package/usr/src/debug/ | ||
723 | cmake-example/1.0-r0/oe-local-files/cpp-example-lib.cpp | ||
724 | .../build/workspace/sources/cmake-example/oe-local-files/cpp-example-lib.cpp | ||
725 | Since the files are anyway outdated lets deleted them (also from pseudo's db) to workaround this issue. | ||
726 | """ | ||
727 | cmd_lines = ['#!/bin/sh'] | ||
728 | |||
729 | # Set up the appropriate environment | ||
730 | newenv = dict(os.environ) | ||
731 | for varvalue in self.fakerootenv.split(): | ||
732 | if '=' in varvalue: | ||
733 | splitval = varvalue.split('=', 1) | ||
734 | newenv[splitval[0]] = splitval[1] | ||
735 | |||
736 | # Replicate the environment variables from bitbake | ||
737 | for var, val in newenv.items(): | ||
738 | if not RecipeModified.is_valid_shell_variable(var): | ||
739 | continue | ||
740 | cmd_lines.append('%s="%s"' % (var, val)) | ||
741 | cmd_lines.append('export %s' % var) | ||
742 | |||
743 | # Delete the folders | ||
744 | pkg_dirs = ' '.join([os.path.join(self.workdir, d) for d in [ | ||
745 | "package", "packages-split", "pkgdata", "sstate-install-package", "debugsources.list", "*.spec"]]) | ||
746 | cmd = "%s rm -rf %s" % (self.fakerootcmd, pkg_dirs) | ||
747 | cmd_lines.append('%s || { "%s failed"; exit 1; }' % (cmd, cmd)) | ||
748 | |||
749 | return self.write_script(cmd_lines, 'delete_package_dirs') | ||
750 | |||
751 | def gen_deploy_target_script(self, args): | 715 | def gen_deploy_target_script(self, args): |
752 | """Generate a script which does what devtool deploy-target does | 716 | """Generate a script which does what devtool deploy-target does |
753 | 717 | ||
@@ -785,8 +749,6 @@ class RecipeModified: | |||
785 | """Generate a script which does install and deploy""" | 749 | """Generate a script which does install and deploy""" |
786 | cmd_lines = ['#!/bin/bash'] | 750 | cmd_lines = ['#!/bin/bash'] |
787 | 751 | ||
788 | cmd_lines.append(self.gen_delete_package_dirs()) | ||
789 | |||
790 | # . oe-init-build-env $BUILDDIR | 752 | # . oe-init-build-env $BUILDDIR |
791 | # Note: Sourcing scripts with arguments requires bash | 753 | # Note: Sourcing scripts with arguments requires bash |
792 | cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % ( | 754 | cmd_lines.append('cd "%s" || { echo "cd %s failed"; exit 1; }' % ( |