SHA256
1
0
forked from pool/rpmlint
rpmlint/suse-hide-unstripped-outside-build.diff

24 lines
806 B
Diff
Raw Normal View History

Index: BinariesCheck.py
===================================================================
--- BinariesCheck.py.orig
+++ BinariesCheck.py
@@ -10,6 +10,7 @@
import re
import stat
+import os
import rpm
@@ -264,7 +265,9 @@ class BinariesCheck(AbstractCheck.Abstra
# stripped ?
if not is_ocaml_native and not unstrippable.search(fname):
- if 'not stripped' in pkgfile.magic:
+ if 'not stripped' in pkgfile.magic and \
+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \
+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1):
printWarning(
pkg, 'unstripped-binary-or-object', fname)