[tor-commits] [tor-browser/tor-browser-78.1.0esr-10.0-1] Bug 1651680 - Replace PKG_SKIP_STRIP with PKG_STRIP. r=nalexander

gk at torproject.org gk at torproject.org
Tue Aug 11 19:43:37 UTC 2020


commit 904d2bbec4fa8984cc29e27478ddcf69c4ba9594
Author: Mike Hommey <mh+mozilla at glandium.org>
Date:   Tue Aug 11 02:44:17 2020 +0000

    Bug 1651680 - Replace PKG_SKIP_STRIP with PKG_STRIP. r=nalexander
    
    Differential Revision: https://phabricator.services.mozilla.com/D86648
---
 moz.configure                            | 8 +-------
 python/mozbuild/mozpack/executables.py   | 2 +-
 testing/testsuite-targets.mk             | 2 +-
 toolkit/mozapps/installer/l10n-repack.py | 2 +-
 toolkit/mozapps/installer/strip.py       | 2 +-
 toolkit/mozapps/installer/unpack.py      | 2 +-
 6 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/moz.configure b/moz.configure
index e86018b1e814..f22c7185f300 100755
--- a/moz.configure
+++ b/moz.configure
@@ -682,13 +682,7 @@ set_config('ENABLE_STRIP', True, when='--enable-strip')
 js_option('--disable-install-strip', when=may_strip,
           help='Enable stripping of libs & executables when packaging')
 
-# The nested depends is because depending on --enable-install-strip needs the
-# `when=may_strip`, but we also need to test when may_strip is False.
- at depends(depends('--enable-install-strip', when=may_strip)(lambda x: x), may_strip)
-def pkg_skip_strip(install_strip, may_strip):
-    return not install_strip or not may_strip
-
-set_config('PKG_SKIP_STRIP', True, when=pkg_skip_strip)
+set_config('PKG_STRIP', True, when='--enable-install-strip')
 
 
 @depends('--enable-strip', '--enable-install-strip', when=may_strip)
diff --git a/python/mozbuild/mozpack/executables.py b/python/mozbuild/mozpack/executables.py
index da12ab0aa33f..593a2e571a94 100644
--- a/python/mozbuild/mozpack/executables.py
+++ b/python/mozbuild/mozpack/executables.py
@@ -86,7 +86,7 @@ def may_strip(path):
     Return whether strip() should be called
     '''
     from buildconfig import substs
-    return not substs.get('PKG_SKIP_STRIP')
+    return bool(substs.get('PKG_STRIP'))
 
 
 def strip(path):
diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk
index 39a69c662ad0..157c030a09c3 100644
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -195,7 +195,7 @@ stage-jstests: make-stage-dir
 
 ifdef OBJCOPY
 ifneq ($(OBJCOPY), :) # see build/autoconf/toolchain.m4:102 for why this is necessary
-ifndef PKG_SKIP_STRIP
+ifdef PKG_STRIP
 STRIP_COMPILED_TESTS := 1
 endif
 endif
diff --git a/toolkit/mozapps/installer/l10n-repack.py b/toolkit/mozapps/installer/l10n-repack.py
index cf1b83dfe2c4..fbdadd0718a1 100644
--- a/toolkit/mozapps/installer/l10n-repack.py
+++ b/toolkit/mozapps/installer/l10n-repack.py
@@ -49,7 +49,7 @@ def main():
     args = parser.parse_args()
 
     buildconfig.substs['USE_ELF_HACK'] = False
-    buildconfig.substs['PKG_SKIP_STRIP'] = True
+    buildconfig.substs['PKG_STRIP'] = False
     l10n.repack(args.build, args.l10n, extra_l10n=dict(args.extra_l10n),
                 non_resources=args.non_resource, non_chrome=NON_CHROME)
 
diff --git a/toolkit/mozapps/installer/strip.py b/toolkit/mozapps/installer/strip.py
index d6e81f280bfa..734d6c8fa5a3 100644
--- a/toolkit/mozapps/installer/strip.py
+++ b/toolkit/mozapps/installer/strip.py
@@ -14,7 +14,7 @@ def strip(dir):
     copier = FileCopier()
     # The FileFinder will give use ExecutableFile instances for files
     # that can be stripped, and copying ExecutableFiles defaults to
-    # stripping them unless buildconfig.substs['PKG_SKIP_STRIP'] is set.
+    # stripping them when buildconfig.substs['PKG_STRIP'] is set.
     for p, f in FileFinder(dir, find_executables=True):
         copier.add(p, f)
     copier.copy(dir)
diff --git a/toolkit/mozapps/installer/unpack.py b/toolkit/mozapps/installer/unpack.py
index f7e9e00622a0..03af61b7b93c 100644
--- a/toolkit/mozapps/installer/unpack.py
+++ b/toolkit/mozapps/installer/unpack.py
@@ -18,7 +18,7 @@ def main():
     options = parser.parse_args(sys.argv[1:])
 
     buildconfig.substs['USE_ELF_HACK'] = False
-    buildconfig.substs['PKG_SKIP_STRIP'] = True
+    buildconfig.substs['PKG_STRIP'] = False
     unpack(options.directory, options.omnijar)
 
 if __name__ == "__main__":





More information about the tor-commits mailing list