All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped
@ 2018-02-14 15:07 Richard Purdie
  2018-02-14 15:07 ` [PATCH 2/2] ltp: Improve package stripping Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Purdie @ 2018-02-14 15:07 UTC (permalink / raw)
  To: openembedded-core

There are cases where its useful to allow only a select few files
to be excluded from the package stripping mechanism. Currently
this isn't possible so add a variable to allow this.

This is to be used sparingly as in general the core code should be
doing the right thing. This is better than the alternative of leaving the whole
package unstripped.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 6a7f35a..90e5236 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -946,6 +946,7 @@ python split_and_strip_files () {
     inodes = {}
     libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
     baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
+    skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
     if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
             d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
         for root, dirs, files in cpath.walk(dvar):
@@ -961,6 +962,9 @@ python split_and_strip_files () {
                 if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
                     continue
 
+                if file in skipfiles:
+                    continue
+
                 try:
                     ltarget = cpath.realpath(file, dvar, False)
                     s = cpath.lstat(ltarget)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ltp: Improve package stripping
  2018-02-14 15:07 [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Richard Purdie
@ 2018-02-14 15:07 ` Richard Purdie
  2018-02-16  3:00 ` [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Khem Raj
  2018-02-16 19:56 ` Alejandro Enedino Hernandez Samaniego
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2018-02-14 15:07 UTC (permalink / raw)
  To: openembedded-core

Just exclude the specific tests which have an issue with being stripped
rather than the whole package. This reduces the disk footprint by around
400MB.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-extended/ltp/ltp_20180118.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/ltp/ltp_20180118.bb b/meta/recipes-extended/ltp/ltp_20180118.bb
index 369b98d..3ed7172 100644
--- a/meta/recipes-extended/ltp/ltp_20180118.bb
+++ b/meta/recipes-extended/ltp/ltp_20180118.bb
@@ -102,10 +102,8 @@ RDEPENDS_${PN} = "\
 
 FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a"
 
-# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-# However, test_arch_stripped is already stripped, so...
+# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail
+INHIBIT_PACKAGE_STRIP_FILES = "/opt/ltp/testcases/bin/nm01 /opt/ltp/testcases/bin/ldd01"
 INSANE_SKIP_${PN} += "already-stripped staticdev"
 
 # Avoid file dependency scans, as LTP checks for things that may or may not
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped
  2018-02-14 15:07 [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Richard Purdie
  2018-02-14 15:07 ` [PATCH 2/2] ltp: Improve package stripping Richard Purdie
@ 2018-02-16  3:00 ` Khem Raj
  2018-02-16 19:56 ` Alejandro Enedino Hernandez Samaniego
  2 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2018-02-16  3:00 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Wed, Feb 14, 2018 at 7:07 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> There are cases where its useful to allow only a select few files
> to be excluded from the package stripping mechanism. Currently
> this isn't possible so add a variable to allow this.
>
> This is to be used sparingly as in general the core code should be
> doing the right thing. This is better than the alternative of leaving the whole
> package unstripped.

This variable should be documented in manual as well IMO

>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/package.bbclass | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 6a7f35a..90e5236 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -946,6 +946,7 @@ python split_and_strip_files () {
>      inodes = {}
>      libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
>      baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
> +    skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
>      if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
>              d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
>          for root, dirs, files in cpath.walk(dvar):
> @@ -961,6 +962,9 @@ python split_and_strip_files () {
>                  if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
>                      continue
>
> +                if file in skipfiles:
> +                    continue
> +
>                  try:
>                      ltarget = cpath.realpath(file, dvar, False)
>                      s = cpath.lstat(ltarget)
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped
  2018-02-14 15:07 [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Richard Purdie
  2018-02-14 15:07 ` [PATCH 2/2] ltp: Improve package stripping Richard Purdie
  2018-02-16  3:00 ` [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Khem Raj
@ 2018-02-16 19:56 ` Alejandro Enedino Hernandez Samaniego
  2 siblings, 0 replies; 4+ messages in thread
From: Alejandro Enedino Hernandez Samaniego @ 2018-02-16 19:56 UTC (permalink / raw)
  To: openembedded-core

Hey Richard,


Do we expect to backport this to older releases?


Cheers,


Alejandro


On 02/14/2018 07:07 AM, Richard Purdie wrote:
> There are cases where its useful to allow only a select few files
> to be excluded from the package stripping mechanism. Currently
> this isn't possible so add a variable to allow this.
>
> This is to be used sparingly as in general the core code should be
> doing the right thing. This is better than the alternative of leaving the whole
> package unstripped.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>   meta/classes/package.bbclass | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 6a7f35a..90e5236 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -946,6 +946,7 @@ python split_and_strip_files () {
>       inodes = {}
>       libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir"))
>       baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir"))
> +    skipfiles = (d.getVar("INHIBIT_PACKAGE_STRIP_FILES") or "").split()
>       if (d.getVar('INHIBIT_PACKAGE_STRIP') != '1' or \
>               d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'):
>           for root, dirs, files in cpath.walk(dvar):
> @@ -961,6 +962,9 @@ python split_and_strip_files () {
>                   if debugdir and debugdir in os.path.dirname(file[len(dvar):]):
>                       continue
>   
> +                if file in skipfiles:
> +                    continue
> +
>                   try:
>                       ltarget = cpath.realpath(file, dvar, False)
>                       s = cpath.lstat(ltarget)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-16 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 15:07 [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Richard Purdie
2018-02-14 15:07 ` [PATCH 2/2] ltp: Improve package stripping Richard Purdie
2018-02-16  3:00 ` [PATCH 1/2] package: Add INHIBIT_PACKAGE_STRIP_FILES to allow files to remain unstripped Khem Raj
2018-02-16 19:56 ` Alejandro Enedino Hernandez Samaniego

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.