Bug 12036

Summary: ar rejects filenames containing '~' in the path
Product: binutils Reporter: Steve Langasek <vorlon>
Component: binutilsAssignee: unassigned
Status: NEW ---    
Severity: normal CC: bug-binutils, doko
Priority: P2    
Version: 2.20   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: add ~ to the set of valid filename chars

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>.