in reply to manipulating cpio archive
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: manipulating cpio archive
by momo33 (Beadle) on Jan 17, 2011 at 18:32 UTC | |
by Corion (Patriarch) on Jan 17, 2011 at 18:39 UTC | |
by momo33 (Beadle) on Jan 17, 2011 at 19:20 UTC | |
by Corion (Patriarch) on Jan 17, 2011 at 19:34 UTC | |
by Anonymous Monk on Jan 17, 2011 at 20:06 UTC | |
|