Specify --chroot and -h to tar so that it will chroot into the target
filesystem and then follow existing symbolic links in that filesystem. The choot is required to make absolute links be processed correctly, and must be done by tar because the program (and input file) do not exist inside the chroot. Fixes PR install/5010 and install/8090 (at least)
This commit is contained in:
parent
b1bc1fb2fa
commit
c74f8d82e5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: util.c,v 1.131 2004/11/11 22:30:49 dsl Exp $ */
|
||||
/* $NetBSD: util.c,v 1.132 2004/11/11 22:39:03 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -653,16 +653,16 @@ extract_file(int set, int update, int verbose, char *path)
|
|||
} else
|
||||
target_chdir_or_die("/");
|
||||
|
||||
/* now extract set files files into "./". */
|
||||
/* now extract set files into "./". */
|
||||
if (verbose == 0)
|
||||
tarexit = run_program(RUN_DISPLAY | RUN_PROGRESS,
|
||||
"progress -zf %s tar -xepf -", path);
|
||||
"progress -zf %s tar --chroot -xhepf -", path);
|
||||
else if (verbose == 1)
|
||||
tarexit = run_program(RUN_DISPLAY,
|
||||
"tar -zxepf %s", path);
|
||||
"tar --chroot -zxhepf %s", path);
|
||||
else
|
||||
tarexit = run_program(RUN_DISPLAY | RUN_PROGRESS,
|
||||
"tar -zxvepf %s", path);
|
||||
"tar --chroot -zxhvepf %s", path);
|
||||
|
||||
chdir(owd);
|
||||
free(owd);
|
||||
|
|
Loading…
Reference in New Issue