Re: [Rpm-maint] [rpm-software-management/rpm] Print exit code with rpm -vv (from @n3npq, #195) (#252)

2017-07-17 Thread ニール・ゴンパ
@junaruga Adjusted.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/252#issuecomment-315819642___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Print exit code with rpm -vv (from @n3npq, #195) (#252)

2017-07-17 Thread ニール・ゴンパ
@Conan-Kudo pushed 1 commit.

d44a7c7  Change output text to 'Exit status'


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/252/files/c89b5ad22e941972c849b70b57c3c77e4692f2ae..d44a7c7338abee2f2fd5cdb9d161d09ad66c2dfd
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Print exit code with rpm -vv (from @n3npq, #195) (#252)

2017-07-17 Thread Jun Aruga
junaruga commented on this pull request.



> @@ -354,5 +354,7 @@ int main(int argc, char *argv[])
 
 rpmcliFini(optCon);
 
+rpmlog(RPMLOG_DEBUG, "exit code: %d\n", ec);

"Exit status" is better isn't it?

```
$ man ls
...
   Exit status:
   0  if OK,
   1  if minor problems (e.g., cannot access subdirectory),
   2  if serious trouble (e.g., cannot access command-line argument).
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/252#pullrequestreview-50380621___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [PATCH] find-debuginfo.sh: Add --keep-section and --remove-section for eu-strip.

2017-07-17 Thread Mark Wielaard
Use --keep-section SECTION or --remove-section SECTION to explicitly
keep a (non-allocated) section in the main executable or explicitly
remove it into the .debug file. SECTION is an extended wildcard pattern.
Both options can be given more than once.

https://bugzilla.redhat.com/show_bug.cgi?id=1465997

Signed-off-by: Mark Wielaard 
---
 scripts/find-debuginfo.sh | 21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 5613391..e19ce9b 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -3,6 +3,7 @@
 #for inclusion in an rpm spec file.
 #
 # Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] [-m] [-i] [-n]
+# [--keep-section SECTION] [--remove-section SECTION]
 # [-j N]
 # [-o debugfiles.list]
 # [-S debugsourcefiles.list]
@@ -15,9 +16,14 @@
 # [builddir]
 #
 # The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
+# The -r flag says to use eu-strip --reloc-debug-sections.
+# Use --keep-section SECTION or --remove-section SECTION to explicitly
+# keep a (non-allocated) section in the main executable or explicitly
+# remove it into the .debug file. SECTION is an extended wildcard pattern.
+# Both options can be given more than once.
+#
 # The --strict-build-id flag says to exit with failure status if
 # any ELF binary processed fails to contain a build-id note.
-# The -r flag says to use eu-strip --reloc-debug-sections.
 # The -m flag says to include a .gnu_debugdata section in the main binary.
 # The -i flag says to include a .gdb_index section in the .debug file.
 # The -n flag says to not recompute the build-id.
@@ -65,6 +71,9 @@ strip_g=false
 # with -r arg, pass --reloc-debug-sections to eu-strip.
 strip_r=false
 
+# keep or remove arguments to eu-strip.
+keep_remove_args=
+
 # with -m arg, add minimal debuginfo to binary.
 include_minidebug=false
 
@@ -158,6 +167,14 @@ while [ $# -gt 0 ]; do
   -r)
 strip_r=true
 ;;
+  --keep-section)
+keep_remove_args="${keep_remove_args} --keep-section $2"
+shift
+;;
+  --remove-section)
+keep_remove_args="${keep_remove_args} --remove-section $2"
+shift
+;;
   -j)
 n_jobs=$2
 shift
@@ -215,7 +232,7 @@ strip_to_debug()
   application/x-sharedlib*) g=-g ;;
   application/x-executable*) g=-g ;;
   esac
-  eu-strip --remove-comment $r $g -f "$1" "$2" || exit
+  eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit
   chmod 444 "$1" || exit
 }
 
-- 
1.8.3.1

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint