From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Russ Dill <russ.dill@nikolamotor.com>,
"Poky@lists.yoctoproject.org" <Poky@lists.yoctoproject.org>
Cc: Diego Sueiro <diego.sueiro@arm.com>
Subject: Re: [poky] [PATCH] poky/package: Prevent perform_packagecopy from removing /sysroot-only
Date: Thu, 24 Mar 2022 00:31:07 +0000 [thread overview]
Message-ID: <ac4ff1eb718d479fb3d2ee503e035f19@axis.com> (raw)
In-Reply-To: <CA+05MtrFZG5QCZob=6CTzagTFu1QaB5MBSokghNEqNU1AUCV5g@mail.gmail.com>
> -----Original Message-----
> From: poky@lists.yoctoproject.org <poky@lists.yoctoproject.org> On Behalf
> Of Russ Dill
> Sent: den 24 mars 2022 00:04
> To: Poky@lists.yoctoproject.org
> Cc: Diego Sueiro <diego.sueiro@arm.com>
> Subject: [poky] [PATCH] poky/package: Prevent perform_packagecopy from removing /sysroot-only
* Don't prefix the subject with "poky/". And for bbclasses it is
better to use the full filename as prefix, i.e.,
"package.bbclass: ..." to distinguish them from recipe names.
* These patches belong on the openembedded-core@lists.openembedded.org
mailing list.
* Your mailer is mangling the patches, introducing newlines that
makes it impossible to apply the patches without manually
removing the extra newlines.
>
> 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.
>
> Signed-off-by: Russ Dill <russ.dill@nikolamotor.com>
> ---
> meta/classes/package.bbclass | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 985dfacd09..c0e9b4dbca 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -428,7 +428,6 @@ def splitstaticdebuginfo(file, dvar,
> debugstaticdir, debugstaticlibdir, debugsta
> # return a mapping of files:debugsources
>
> import stat
> - import shutil
>
> src = file[len(dvar):]
> dest = debugstaticlibdir + os.path.dirname(src) + debugstaticdir
> + "/" + os.path.basename(src) + debugstaticappend
> @@ -811,15 +810,10 @@ python perform_packagecopy () {
> dest = d.getVar('D')
> dvar = d.getVar('PKGD')
>
> - # Remove ${D}/sysroot-only if present
> - sysroot_only = os.path.join(dest, 'sysroot-only')
> - if cpath.exists(sysroot_only) and cpath.isdir(sysroot_only):
> - shutil.rmtree(sysroot_only)
> -
> # Start by package population by taking a copy of the installed
> # files to operate on
> # Preserve sparse files and hard links
> - cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (dest, dvar)
> + cmd = 'tar --exclude=./sysroot-only -cf - -C %s -p -S . | tar -xf
> - -C %s' % (dest, dvar)
> subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
>
> # replace RPATHs for the nativesdk binaries, to make them relocatable
> --
> 2.25.1
//Peter
prev parent reply other threads:[~2022-03-24 0:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 23:03 [PATCH] poky/package: Prevent perform_packagecopy from removing /sysroot-only russ.dill
2022-03-24 0:31 ` Peter Kjellerstedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac4ff1eb718d479fb3d2ee503e035f19@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=Poky@lists.yoctoproject.org \
--cc=diego.sueiro@arm.com \
--cc=russ.dill@nikolamotor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.