Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst Specify --chroot and -h to tar so that...



details:   https://anonhg.NetBSD.org/src/rev/568eb2399dde
branches:  trunk
changeset: 571160:568eb2399dde
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Nov 11 22:39:03 2004 +0000

description:
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)

diffstat:

 distrib/utils/sysinst/util.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 1bba7636ea22 -r 568eb2399dde distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c      Thu Nov 11 22:30:49 2004 +0000
+++ b/distrib/utils/sysinst/util.c      Thu Nov 11 22:39:03 2004 +0000
@@ -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 @@
        } 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);



Home | Main Index | Thread Index | Old Index