Seeing that Archive::Cpio::read is implemented as
sub read { my ($cpio, $file) = @_; my $IN; if (ref $file) { $IN = $file; } else { open($IN, '<', $file) or die "can't open $file: $!\n"; } read_with_handler($cpio, $IN, sub { my ($e) = @_; push @{$cpio->{list}}, $e; });
and Archive::Cpio::remove is implemented as
sub remove { my ($cpio, @filenames) = @_; $cpio->{list} or die "can't remove from nothing\n"; my %filenames = map { $_ => 1 } @filenames; @{$cpio->{list}} = grep { !$filenames{$_} } @{$cpio->{list}}; }
I would assume that there is no file test1 in your cpio archive. Maybe there is a directory name prepended? Have a look at what information Archive::Cpio actually reads from your archive, and/or what your archive actually contains.
In reply to Re: manipulating cpio archive
by Corion
in thread manipulating cpio archive
by momo33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |