ar fails when double-slashes are used in certain paths

Bug #494797 reported by Nonconventionally Creative
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: binutils

Ubuntu Jaunty, binutils 2.19.1-0ubuntu3
Ubuntu Karmic, binutils 2.20-0ubuntu2
Expected: paths with double slashes work transparently, as in (most) other programs, or at the worst, give a relevant error message.
Actual: paths with double slashes fail silently (i.e. are not included in the archive) or with a bogus error message ("No such file" when it exists).
See attached script for test cases.

Revision history for this message
Nonconventionally Creative (br-longbons) wrote :
Matthias Klose (doko)
Changed in binutils (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Oliver Grawert (ogra) wrote :

the same happens for paths with plus signs ...

(echo create /build/buildd/uboot-imx-2009.08+really2009.01/build/build-imx51/post/libpost.a; for lib in ; \
  do echo addlib $lib; done; echo save) \
 | ar -M
+Syntax error in archive script, line 1

Revision history for this message
Loïc Minier (lool) wrote :

This is specific to thin archives.

Revision history for this message
Loïc Minier (lool) wrote :

The test case mentions multiple problems, but I think it boils down to one: when the path to the archive to create has "//" and relative path names are used for files to put in the archive, the relative path stored in the archive is wrong (one "../" too much).

Revision history for this message
Matthias Klose (doko) wrote :

can't reproduce this in 14.10

Changed in binutils (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.