public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do'
@ 2021-05-12 10:46 vt at altlinux dot org
  2021-05-12 10:54 ` [Bug tools/27856] " vt at altlinux dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vt at altlinux dot org @ 2021-05-12 10:46 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=27856

            Bug ID: 27856
           Summary: eu-elfcompress exit code changed to a error if
                    'Nothing to do'
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tools
          Assignee: unassigned at sourceware dot org
          Reporter: vt at altlinux dot org
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

This commit changes behavior of `eu-elfcompress` from what before was success
to error - when 'Nothing to do' conditions are meet.

```
commit ed62996defc619d0def86a5ed223a48486b97a70
Author: Mark Wielaard <mark@klomp.org>
Date:   Sat Jul 21 17:07:12 2018 +0200

    elfcompress: Don't rewrite file if no section data needs to be updated.

    If the input and output file are the same and no section needs to
    be updated we really don't need to rewrite the file.

    Check whether any matching section is already compressed or decompressed.
    Skip the section if it doesn't need to be changed. If no section data
    needs updating end with success without rewriting/updating file.

    With --force the file will still always be updated/rewritten even if
    no section data needs to be (de)compressed.

    Acked-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
    Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 src/ChangeLog     |  7 +++++++
 src/elfcompress.c | 45 ++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 49 insertions(+), 3 deletions(-)

```

Is this change of behavior intentional? (Now it breaks debuginfo processing of
kernel modules in ALT Linux).

  + eu-elfcompress --verbose
./usr/lib/debug/lib/modules/5.10.35-std-def-alt1/fs/unicode/zunicode.ko.debug
  processing:
./usr/lib/debug/lib/modules/5.10.35-std-def-alt1/fs/zcommon/zcommon.ko.debug
  Nothing to do.
  Command exited with non-zero status 1

Also, exit(-1) is incorrect exit code in general.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tools/27856] eu-elfcompress exit code changed to a error if 'Nothing to do'
  2021-05-12 10:46 [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do' vt at altlinux dot org
@ 2021-05-12 10:54 ` vt at altlinux dot org
  2021-05-12 12:49 ` mark at klomp dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vt at altlinux dot org @ 2021-05-12 10:54 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=27856

--- Comment #1 from Vitaly Chikunov <vt at altlinux dot org> ---
Correction of copy-paste:

+ eu-elfcompress --verbose
./usr/lib/debug/lib/modules/5.10.35-std-def-alt1/fs/unicode/zunicode.ko.debug
processing:
./usr/lib/debug/lib/modules/5.10.35-std-def-alt1/fs/unicode/zunicode.ko.debug
Nothing to do.
xargs: /usr/lib/rpm/process-debuginfo: exited with status 255; aborting
error: Bad exit status from /usr/src/tmp/rpm-tmp.71446 (%install)
Command exited with non-zero status 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tools/27856] eu-elfcompress exit code changed to a error if 'Nothing to do'
  2021-05-12 10:46 [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do' vt at altlinux dot org
  2021-05-12 10:54 ` [Bug tools/27856] " vt at altlinux dot org
@ 2021-05-12 12:49 ` mark at klomp dot org
  2021-05-12 20:43 ` vt at altlinux dot org
  2021-05-12 23:13 ` ldv at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2021-05-12 12:49 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=27856

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |mark at klomp dot org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-05-12

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
Yes, that looks like a unintended bug. The code should have set res = 0 before
goto cleanup.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tools/27856] eu-elfcompress exit code changed to a error if 'Nothing to do'
  2021-05-12 10:46 [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do' vt at altlinux dot org
  2021-05-12 10:54 ` [Bug tools/27856] " vt at altlinux dot org
  2021-05-12 12:49 ` mark at klomp dot org
@ 2021-05-12 20:43 ` vt at altlinux dot org
  2021-05-12 23:13 ` ldv at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: vt at altlinux dot org @ 2021-05-12 20:43 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=27856

--- Comment #3 from Vitaly Chikunov <vt at altlinux dot org> ---
Excuse me for referencing the wrong commit. It was another copy-paste error.

  0df0e8e Timm Bäder      2021-02-17 09:45 +0100  522│   if (foutput == NULL &&
get_sections (sections, shnum) == 0)
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  523│     {
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  524│       if (verbose > 0)
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  525│         printf ("Nothing
to do.\n");
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  526│       fnew = NULL;
  c497478 Timm Bäder      2021-03-02 09:05 +0100  527│       goto cleanup;
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  528│     }
  ed62996 Mark Wielaard   2018-07-21 17:07 +0200  529│

Kudos to Dmitry for the quick fix!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug tools/27856] eu-elfcompress exit code changed to a error if 'Nothing to do'
  2021-05-12 10:46 [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do' vt at altlinux dot org
                   ` (2 preceding siblings ...)
  2021-05-12 20:43 ` vt at altlinux dot org
@ 2021-05-12 23:13 ` ldv at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: ldv at sourceware dot org @ 2021-05-12 23:13 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=27856

Dmitry V. Levin <ldv at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Assignee|unassigned at sourceware dot org   |ldv at sourceware dot org
         Resolution|---                         |FIXED

--- Comment #4 from Dmitry V. Levin <ldv at sourceware dot org> ---
Fixed by commit 43ac25c2de7ba21fb8f9e4d4db0c01c1408da0b8.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-05-12 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 10:46 [Bug tools/27856] New: eu-elfcompress exit code changed to a error if 'Nothing to do' vt at altlinux dot org
2021-05-12 10:54 ` [Bug tools/27856] " vt at altlinux dot org
2021-05-12 12:49 ` mark at klomp dot org
2021-05-12 20:43 ` vt at altlinux dot org
2021-05-12 23:13 ` ldv at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).