NetBSD-Bugs archive

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

bin/44303: /bin/cpio doesn't accept combination of options '-i -t'



>Number:         44303
>Category:       bin
>Synopsis:       /bin/cpio doesn't accept combination of options '-i -t'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 31 22:10:00 +0000 2010
>Originator:     Michai Ramakers
>Release:        5.1
>Organization:
>Environment:
NetBSD multi 5.1 NetBSD 5.1 (XEN3PAE_DOM0) #0: Sun Nov  7 15:07:49 UTC 2010  
builds%b6.netbsd.org@localhost:/home/builds/ab/netbsd-5-1-RELEASE/i386/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/i386/compile/XEN3PAE_DOM0
 i386
>Description:
/bin/cpio doesn't accept a combination of -i (extract) and -t (list) options, 
although cpio(1) suggests -t is only valid in combination with -i.


>How-To-Repeat:
$ mkdir test
$ cd test
$ echo >foo
$ echo foo | cpio -o > arch
$ cpio -i -t < arch
usage: cpio -o [-aABcLvzZ] [-C bytes] [-F archive] [-H format] [-O archive]
               < name-list [> archive]
       cpio -i [-bBcdfmrsStuvzZ6] [-C bytes] [-E file] [-F archive] [-H format] 
               [-I archive] [pattern ...] [< archive]
       cpio -p [-adlLmuv] destination-directory < name-list
$ cpio -t < arch
foo
$
>Fix:
quickfix: using -t in isolation works, e.g. 'cpio -t < arch'.

This is apparently fixed in src/bin/pax/options.c 1.108:
 
  Do not throw a usage message for -i followed by -t
  since 'cpio -itv' is a valid command.

...but only fixes up to and including 1.106 are included for netbsd-5 or 
netbsd-5-1-RELEASE.



Home | Main Index | Thread Index | Old Index