bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ar not POSIX conform


From: Tobias Burnus
Subject: ar not POSIX conform
Date: Wed, 1 Oct 2003 20:39:52 +0200
User-agent: Mutt/1.3.28i

Hello,

Unfortunally, ar is not POSIX conform. The problems (a), (b) and (c) are
needed to be POSIX 2002 (SUSv3/IEEE Std 1003.1, 2003) conform.
(d) and (e) are needed to allow for the XSI extensions.

The Linux Standard Base wants to require SUSv3/XSI compatibility, but only
if there are open source (e.g. GNU) packages which support it. Otherwise
these areas will be marked in the "LSB differences" section.


http://www.unix.org/single_unix_specification/



a) Neither "ar -p -v" nor "ar -p-v" are accepted, only
   "ar -pv". (analogous for the other options).

   I don't see from the standard whether "-p-v" needs to be supported,
   but at least -p -v has to be supported. On Tru64 Unix, ar supports
   all stated possibilities.



b) The output format of ar -pv is wrong, it is "\n<member %s>\n\n", <file>
   instead of "\n<%s>\n\n", <file>

| STDOUT
|
| If the -p option is used with the -v option, ar shall precede
| the contents of each file with:
|
|    "\n<%s>\n\n", <file>
|
| where file is the operand specified on the command line, if file
| operands were specified, and the name of the file in the archive if
| they were not. 



c) Message to STDERR missing when archive is created and the -c option to
   suppress this.

   SUSv3:
   -c
      Suppress the diagnostic message that is written to standard error by
      default when the archive archive is created.
   On Tru64 Unix:
   ~> ar -r ar bar
   ar: Warning: creating ar


d) XSI extension in SUSv3:
|
|  ar -q[-cv] archive file ...
|
| -q [XSI] 
|  Append the named files to the end of the archive. In this case ar does not
|  check whether the added files are already in the archive. This is useful to
|  bypass the searching otherwise done when creating a large archive piece by
|  piece.
For -c, see above.

e) -C and -T are not supported (XSI extension)

|
| ar -x[-v][-sCT] archive [file ...]
|
| -C  Prevent extracted files from replacing like-named files in the file
|     system. This option is useful when -T is also used, to prevent
|     truncated filenames from replacing files with the same prefix.
|
| -T  Allow filename truncation of extracted files whose archive names are
|     longer than the file system can support. By default, extracting a
|     file with a name that is too long shall be an error; a diagnostic
|     message shall be written and the file shall not be extracted.


With best regards,

Tobias Burnus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]