cpio problem in Mandriva 2005
"Ben" <[email protected]> Tue, 10 May 2005 14:59:26 +1000
| Newsgroups | gmane.linux.pxes.devel |
|---|---|
| Message-ID | <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAAC4AAAAAAAAAc9iELVBlh0u9eTqIaGoykgEAOMwfGf03eUWX/PpPgB3WXQAAAAAUFgAAEAAAAB961aJKM1dHlfZIunvDjCgBAAAAAA==@clivepeeters.com.au> |
It appears Mandriva 2005 (Mandrake 10.2) has problems with cpio and symlinks. It copies the file rather than the link. Find attached a patch to make 'pxesconfig-1.0-7' use tar instead of cpio. Yours truly, Ben
pxesconfig.patch
(application/octet-stream, 868 B)
diff -Naur pxesconfig-1.0/Pxesconfig/PxesconfigModel.pm pxesconfig-1.0-mod/Pxesconfig/PxesconfigModel.pm
--- pxesconfig-1.0/Pxesconfig/PxesconfigModel.pm 2005-05-07 14:01:48.000000000 +1000
+++ pxesconfig-1.0-mod/Pxesconfig/PxesconfigModel.pm 2005-05-10 13:54:06.000000000 +1000
@@ -2849,7 +2849,7 @@
system("mkdir -p $to");
}
- $r = system("/bin/sh -c \"(cd $from; find -depth -print | grep -v '\.svn' | cpio -pdum $to > $tmpbase.log 2> $tmpbase.err)\"");
+ $r = system("/bin/sh -c \"(cd $from; tar -c --exclude=.svn -f - . | (cd $to; tar -xf - > $tmpbase.log 2> $tmpbase.err))\"")
if ( -s "$tmpbase.log" ) {
open(F, "<$tmpbase.log") or die "$!";
@@ -2867,7 +2867,7 @@
open(F, "<$tmpbase.err") or die "$!";
my $l = <F>;
close(F);
- if ( $l !~ /\d+ +block/ ) {
+ if ( $l ) {
open(F, "<$tmpbase.err") or die "$!";
$li = '';
while ( <F> ) {