public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/9532: jar -C flag is incompatible with Sun's
@ 2003-02-01  4:36 Jim.Balter
  0 siblings, 0 replies; only message in thread
From: Jim.Balter @ 2003-02-01  4:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9532
>Category:       other
>Synopsis:       jar -C flag is incompatible with Sun's
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 01 04:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jim Balter
>Release:        jar (fastjar) 0.92-gcc
>Organization:
>Environment:

>Description:
Sun's jar -C flag only affects the next argument,
and is documented as such at
http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/jar.html:
"Temporaily [sic] changes directories during execution of jar command while processing the next argument.  Its operation is intended to be similar to the -C option of the UNIX tar utility." (In the process of filing this,
I realized that GNU tar has the same bug, sigh.)

The jar that comes with gcc works differently;
-C affects all subsequent arguments (but the
wording from jar --help might mislead one into thinking otherwise:
-C DIR FILE     change to the specified directory and include the following file
).

The difference results in an incompatibility when
relative directories are used.  (I have an application
that generates a list of "-C directory file" strings
that breaks with GNU jar.)

>How-To-Repeat:
mkdir foo
echo > foo/bar
jar cf foo.jar -C foo bar -C foo bar

(The error message "Error adding -C to jar archive!"
suggests another bug).
>Fix:
a) use Sun's jar
b) use only absolute directories
c) change the semantics of GNU's jar -C to match Sun's
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-01  4:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-01  4:36 other/9532: jar -C flag is incompatible with Sun's Jim.Balter

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