Bug 12036 - ar rejects filenames containing '~' in the path
Summary: ar rejects filenames containing '~' in the path
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 21:56 UTC by Steve Langasek
Modified: 2010-09-17 22:07 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
add ~ to the set of valid filename chars (190 bytes, patch)
2010-09-17 22:07 UTC, Steve Langasek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Langasek 2010-09-17 21:56:45 UTC
When ar is asked to act on a file whose path includes the '~' character, ar
rejects this with a syntax error.  E.g.:

(echo create
/build/buildd/u-boot-linaro-2010.09~rc1.1/debian/build/omap4_panda/post/libpost.a;
for lib in   ; \
	 do echo addlib $lib; done; echo save) \
	| ar -M
~Syntax error in archive script, line 1

This bug was identified using u-boot, but it's probably reproducible with any
number of pieces of software if built in a parent directory with the appropriate
characteristics.

Patch to follow.
Comment 1 Steve Langasek 2010-09-17 22:07:55 UTC
Created attachment 4989 [details]
add ~ to the set of valid filename chars

Solution to this issue courtesy of Zygmunt Krynicki
<zygmunt.krynicki@linaro.org>.