diff mbox series

[v2,1/4] package.py: Fix static debuginfo split

Message ID 1721345282-10901-2-git-send-email-mark.hatle@kernel.crashing.org
State New
Headers show
Series Fix static-library related issues | expand

Commit Message

Mark Hatle July 18, 2024, 11:27 p.m. UTC
From: Mark Hatle <mark.hatle@amd.com>

Fix:
  NameError: name 'shutil' is not defined

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
 meta/lib/oe/package.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Purdie July 19, 2024, 2:32 p.m. UTC | #1
On Thu, 2024-07-18 at 18:27 -0500, Mark Hatle via lists.openembedded.org wrote:
> From: Mark Hatle <mark.hatle@amd.com>
> 
> Fix:
>   NameError: name 'shutil' is not defined
> 
> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> ---
>  meta/lib/oe/package.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> index e6b46a0..8a64e13 100644
> --- a/meta/lib/oe/package.py
> +++ b/meta/lib/oe/package.py
> @@ -838,6 +838,8 @@ def splitdebuginfo(file, dvar, dv, d):
>      return (file, sources)
>  
>  def splitstaticdebuginfo(file, dvar, dv, d):
> +    import shutil
> +
>      # Unlike the function above, there is no way to split a static library
>      # two components.  So to get similar results we will copy the unmodified
>      # static library (containing the debug symbols) into a new directory.
> 

For a really minor performance tweak and general python styling, this
should probably go at the top of the file since there isn't any real
reason to have it in this function.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index e6b46a0..8a64e13 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -838,6 +838,8 @@  def splitdebuginfo(file, dvar, dv, d):
     return (file, sources)
 
 def splitstaticdebuginfo(file, dvar, dv, d):
+    import shutil
+
     # Unlike the function above, there is no way to split a static library
     # two components.  So to get similar results we will copy the unmodified
     # static library (containing the debug symbols) into a new directory.