diff options
| author | Russ Dill <russ.dill@nikolamotor.com> | 2022-04-20 09:03:29 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-04 13:07:33 +0100 |
| commit | ef36e735aea8752e92238386c8432cbba104f9d7 (patch) | |
| tree | 26df7b62c52e7ecfdefa62d5a1492dd7ee2c06a0 /meta | |
| parent | 80adcbf1f45b9881c40a2a10ad251423a6219bb0 (diff) | |
| download | poky-ef36e735aea8752e92238386c8432cbba104f9d7.tar.gz | |
package.bbclass: Prevent perform_packagecopy from removing /sysroot-only
The files in /sysroot-only are intended to make it into the
recipes sysroot output, but not into the package. However, if
do_package is run before do_populate_sysroot, the files are
removed.
Use a smaller hammer to avoid copying the files into the package so
they are still around when do_populate_sysroot runs.
(From OE-Core rev: acc0a31305cb1f799e8a6b3ea2d2c5ac5a9f67ee)
Signed-off-by: Russ Dill <russ.dill@nikolamotor.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit 493145c6f1bc92ab2b7a23e181641b09df87c9ff)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/package.bbclass | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e71daafe94..44fbc32df6 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -422,7 +422,6 @@ def splitstaticdebuginfo(file, dvar, dv, d): | |||
| 422 | # return a mapping of files:debugsources | 422 | # return a mapping of files:debugsources |
| 423 | 423 | ||
| 424 | import stat | 424 | import stat |
| 425 | import shutil | ||
| 426 | 425 | ||
| 427 | src = file[len(dvar):] | 426 | src = file[len(dvar):] |
| 428 | dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"] | 427 | dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"] |
| @@ -807,15 +806,10 @@ python perform_packagecopy () { | |||
| 807 | dest = d.getVar('D') | 806 | dest = d.getVar('D') |
| 808 | dvar = d.getVar('PKGD') | 807 | dvar = d.getVar('PKGD') |
| 809 | 808 | ||
| 810 | # Remove ${D}/sysroot-only if present | ||
| 811 | sysroot_only = os.path.join(dest, 'sysroot-only') | ||
| 812 | if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only): | ||
| 813 | shutil.rmtree(sysroot_only) | ||
| 814 | |||
| 815 | # Start by package population by taking a copy of the installed | 809 | # Start by package population by taking a copy of the installed |
| 816 | # files to operate on | 810 | # files to operate on |
| 817 | # Preserve sparse files and hard links | 811 | # Preserve sparse files and hard links |
| 818 | cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar) | 812 | cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar) |
| 819 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) | 813 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
| 820 | 814 | ||
| 821 | # replace RPATHs for the nativesdk binaries, to make them relocatable | 815 | # replace RPATHs for the nativesdk binaries, to make them relocatable |
