[PATCHv2] ref-manual: Add documentation of PACKAGE_DEBUG_FILE_SUFFIX

Message ID 20211223195543.28919-1-pkj@axis.com
State New
Headers show
Series [PATCHv2] ref-manual: Add documentation of PACKAGE_DEBUG_FILE_SUFFIX | expand

Commit Message

Peter Kjellerstedt Dec. 23, 2021, 7:55 p.m. UTC
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: Removed the reference to split_and_strip_files().

 documentation/ref-manual/variables.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Quentin Schulz Jan. 3, 2022, 11:30 a.m. UTC | #1
Hi Peter,

On 12/23/21 20:55, Peter Kjellerstedt wrote:
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> 
> PATCHv2: Removed the reference to split_and_strip_files().
> 
>   documentation/ref-manual/variables.rst | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> index e5216b3f36..c7c9e31f05 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -5085,6 +5085,14 @@ system and gives an overview of their function and contents.
>         result of the package manager in use, see the
>         ":ref:`package.bbclass <ref-classes-package>`" section.
>   
> +   :term:`PACKAGE_DEBUG_FILE_SUFFIX`
> +      This suffix is added to the names of all files with debug symbols that go
> +      into the dbg package. It can be used to make the debug files produced by

s/dbg/``-dbg``/ ?

> +      one recipe unique to avoid them conflicting with identically named debug
> +      files produced by another recipe. This may be needed since while the
> +      target files may be split in multiple packages, the debug files for one
> +      recipe are all in one package.
> +

I'm not sure the explanation is correct. The fact that debug files are 
all in a package is not the cause for conflicts between recipes. Were 
the debug files split into different debug packages, the issue would 
remain when trying to install the debug packages of two recipes with 
conflicting file names. What am I missing?

Also, if it's really a package issue, maybe one could just use 
NOAUTOPACKAGEDEBUG variable and split the files into different debug 
packages so that the conflict does not happen?

Cheers,
Quentin
Peter Kjellerstedt Jan. 7, 2022, 4:50 p.m. UTC | #2
> -----Original Message-----
> From: docs@lists.yoctoproject.org <docs@lists.yoctoproject.org> On Behalf
> Of Quentin Schulz
> Sent: den 3 januari 2022 12:30
> To: docs@lists.yoctoproject.org
> Subject: Re: [docs] [PATCHv2] ref-manual: Add documentation of
> PACKAGE_DEBUG_FILE_SUFFIX
> 
> Hi Peter,
> 
> On 12/23/21 20:55, Peter Kjellerstedt wrote:
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> >
> > PATCHv2: Removed the reference to split_and_strip_files().
> >
> >   documentation/ref-manual/variables.rst | 8 ++++++++
> >   1 file changed, 8 insertions(+)
> >
> > diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> > index e5216b3f36..c7c9e31f05 100644
> > --- a/documentation/ref-manual/variables.rst
> > +++ b/documentation/ref-manual/variables.rst
> > @@ -5085,6 +5085,14 @@ system and gives an overview of their function
> and contents.
> >         result of the package manager in use, see the
> >         ":ref:`package.bbclass <ref-classes-package>`" section.
> >
> > +   :term:`PACKAGE_DEBUG_FILE_SUFFIX`
> > +      This suffix is added to the names of all files with debug symbols that go
> > +      into the dbg package. It can be used to make the debug files produced by
> 
> s/dbg/``-dbg``/ ?
> 
> > +      one recipe unique to avoid them conflicting with identically named debug
> > +      files produced by another recipe. This may be needed since while the
> > +      target files may be split in multiple packages, the debug files for one
> > +      recipe are all in one package.
> > +
> 
> I'm not sure the explanation is correct. The fact that debug files are
> all in a package is not the cause for conflicts between recipes. Were
> the debug files split into different debug packages, the issue would
> remain when trying to install the debug packages of two recipes with
> conflicting file names. What am I missing?

With the introduction of PACKAGE_DEBUG_FILE_SUFFIX, you actually can install 
two debug packages with debug files for target packages that would conflict. 
That is the whole point of the solution.

I.e., you have two target packages A and B1 with files that conflict. You 
obviously only install one of them into your image, in this case package A. 
However, package B1 comes from a recipe B that produces many packages and you 
install some of those other packages in your image too. This is no problem. 
But, if you now want to install the dbg packages, you get a conflict because 
the debug files in A-dbg conflicts with B-dbg since we do not split the dbg 
packages the same way we do for target packages. Adding a suffix to the debug 
files solves this because the debug file for libfoo.so is now called 
libfoo.so-A in A-dbg while it is called libfoo.so in B-dbg (assuming recipe A 
has set PACKAGE_DEBUG_FILE_SUFFIX = "-${PN}").

> Also, if it's really a package issue, maybe one could just use
> NOAUTOPACKAGEDEBUG variable and split the files into different debug
> packages so that the conflict does not happen?

Richard said he did not want a solution that involved splitting the dbg 
packages.

> Cheers,
> Quentin

//Peter

Patch

diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index e5216b3f36..c7c9e31f05 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5085,6 +5085,14 @@  system and gives an overview of their function and contents.
       result of the package manager in use, see the
       ":ref:`package.bbclass <ref-classes-package>`" section.
 
+   :term:`PACKAGE_DEBUG_FILE_SUFFIX`
+      This suffix is added to the names of all files with debug symbols that go
+      into the dbg package. It can be used to make the debug files produced by
+      one recipe unique to avoid them conflicting with identically named debug
+      files produced by another recipe. This may be needed since while the
+      target files may be split in multiple packages, the debug files for one
+      recipe are all in one package.
+
    :term:`PACKAGE_DEBUG_SPLIT_STYLE`
       Determines how to split up and package debug and source information
       when creating debugging packages to be used with the GNU Project