Richard Purdie <[email protected]> escreveu no dia sexta, 1/07/2022 à(s) 12:19:
> On Fri, 2022-07-01 at 12:05 +0100, Jose Quaresma wrote: > > Hi Alejandro, > > > > Alejandro Hernandez Samaniego <[email protected]> escreveu no > dia sexta, 1/07/2022 à(s) 03:09: > > > While executing do_package, bitbake checks for a list of > > > debug source files and uses a pattern to match the ones > > > to be included in copydebugsources. > > > > > > Previously when externalsrc was in use either directly or by > > > using devtool, the source location changed and this pattern > > > no longer matched, hence debug source files failed to be > > > included in the corresponding package. > > > > > > Check when the source directory isnt the default (based on > > > WORKDIR), and change the pattern used to match debug source > > > files if that is the case, allowing us to perform do_package > > > properly. > > > > > > Workaround debugsource.list containing paths from the host by > > > moving debug source files away from the host directory > > > structure to avoid host contamination (this seems to happen > > > when packages use $TMPDIR/work-shared and externalsrc is > > > in use). > > > > > > Test matrix included using: > > > - devtool to use externalsrc automatically > > > - externalsrc with a non-devtool based source directory > > > - No externalsrc at all > > > Tested the following packages to be working: > > > - glibc ($TMPDIR/work-shared based) > > > - libxcrypt ($TMPDIR/work based) > > > > > > [YOCTO 8015] > > > > > > Signed-off-by: Alejandro Enedino Hernandez Samaniego < > [email protected]> > > > --- > > > meta/classes/package.bbclass | 31 ++++++++++++++++++++++++++++--- > > > 1 file changed, 28 insertions(+), 3 deletions(-) > > > > > > diff --git a/meta/classes/package.bbclass > b/meta/classes/package.bbclass > > > index 62050a18b8..4850134022 100644 > > > --- a/meta/classes/package.bbclass > > > +++ b/meta/classes/package.bbclass > > > @@ -553,13 +553,25 @@ def copydebugsources(debugsrcdir, sources, d): > > > strip = d.getVar("STRIP") > > > objcopy = d.getVar("OBJCOPY") > > > workdir = d.getVar("WORKDIR") > > > + sdir = d.getVar("S") > > > + sparentdir = os.path.dirname(os.path.dirname(sdir)) > > > + sbasedir = os.path.basename(os.path.dirname(sdir)) + "/" + > os.path.basename(sdir) > > > workparentdir = os.path.dirname(os.path.dirname(workdir)) > > > workbasedir = os.path.basename(os.path.dirname(workdir)) + > "/" + os.path.basename(workdir) > > > > > > + # If S isnt based on WORKDIR we can infer our sources are > located elsewhere, > > > + # e.g. using externalsrc; use S as base for our dirs > > > > > > > > > This doesn't seem very safe imo, if the idea is to check if the > externalsrc in use it is better using: > > > > if bb.data.inherits_class('externalsrc', d): > > The code is generic enough that if the source is outside WORKDIR, it > should work so I'm not sure it makes sense to gate this on externalsrc > only though... > My comment is mainly because I see the externalsrc everywhere in this patch. But as said to make it generic it's better as it is. Jose > Cheers, > > Richard > > > -- Best regards, José Quaresma
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#167536): https://lists.openembedded.org/g/openembedded-core/message/167536 Mute This Topic: https://lists.openembedded.org/mt/92100558/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
