[Bug tools/28725] New: eu-ar -x -N COUNT uses instance [COUNT+1] of name

2021-12-25 Thread panxh_ran at 163 dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28725

Bug ID: 28725
   Summary: eu-ar -x -N COUNT uses instance [COUNT+1] of name
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: tools
  Assignee: unassigned at sourceware dot org
  Reporter: panxh_ran at 163 dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 13880
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13880&action=edit
the result of eu-ar -x -N COUNT

eu-ar -x -N COUNT should use instance [COUNT] of name, 
but it uses instance [COUNT+1] of name incorrectly.
Usage: -N  Use instance [COUNT] of name.

The attachments show the differences of command result between "eu-ar -x -N
COUNT"
and "ar -x -N COUNT".

do_oper_extract() in src/ar.c
Is it should be instance-- at Line522?
 522   if (res != NULL && (instance < 0 || instance-- == 0)
 523   && !found[(char **) res->data - argv])
 524 found[(char **) res->data - argv] = do_extract = true;
 525 }

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

[Bug tools/28725] eu-ar -x -N COUNT uses instance [COUNT+1] of name

2021-12-25 Thread panxh_ran at 163 dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28725

--- Comment #1 from panxiaohe  ---
Created attachment 13881
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13881&action=edit
the result of ar -x -N COUNT

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

[Bug tools/28726] New: eu-ar -br/-ar deletes existing file from archive file

2021-12-25 Thread panxh_ran at 163 dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28726

Bug ID: 28726
   Summary: eu-ar -br/-ar deletes existing file from archive file
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: tools
  Assignee: unassigned at sourceware dot org
  Reporter: panxh_ran at 163 dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 13882
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13882&action=edit
the result of eu-ar -br

When eu-ar -br/-ar option replaces existing file into archive,
it delete this file incorrectly.
Usage:
-r   Replace existing or insert new file into archive.
-a   Insert file after [MEMBER].
-b   Insert file before [MEMBER].

The attachments show the differences of command result between "eu-ar -br"
and "ar -br".

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

[Bug tools/28726] eu-ar -br/-ar deletes existing file from archive file

2021-12-25 Thread panxh_ran at 163 dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28726

--- Comment #1 from panxiaohe  ---
Created attachment 13883
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13883&action=edit
the result of ar -br

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