Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Apr 2010 06:03:02 GMT
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 176775 for review
Message-ID:  <201004110603.o3B632kY084806@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@176775?ac=10

Change 176775 by gcooper@gcooper-bayonetta on 2010/04/11 06:02:43

	Remove broken -C [chroot] functionality. See bin/109334 for more details.

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/futil.c#5 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/main.c#6 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/perform.c#3 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/pkg_add.1#2 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/futil.c#5 (text+ko) ====


==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/main.c#6 (text+ko) ====

@@ -31,7 +31,6 @@
 
 char	*Prefix		= NULL;
 Boolean	PrefixRecursive	= FALSE;
-char	*Chroot		= NULL;
 Boolean	NoInstall	= FALSE;
 Boolean	NoRecord	= FALSE;
 Boolean Remote		= FALSE;
@@ -59,7 +58,6 @@
 
 static char opts[] = "hviIRfFnrp:P:SMt:C:K";
 static struct option longopts[] = {
-	{ "chroot",	required_argument,	NULL,		'C' },
 	{ "dry-run",	no_argument,		NULL,		'n' },
 	{ "force",	no_argument,		NULL,		'f' },
 	{ "help",	no_argument,		NULL,		'h' },
@@ -151,10 +149,6 @@
 	    AddMode = MASTER;
 	    break;
 
-	case 'C':
-	    Chroot = optarg;
-	    break;
-
 	case 'i':
 	    IgnoreDeps = TRUE;
 	    break;
@@ -232,11 +226,6 @@
 	warnx("only one package name may be specified with master mode");
 	usage();
     }
-    /* Perform chroot if requested */
-    if (Chroot != NULL) {
-	if (chroot(Chroot))
-	    errx(1, "chroot to %s failed", Chroot);
-    }
     /* Make sure the sub-execs we invoke get found */
     setenv("PATH", 
 	   "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
@@ -309,7 +298,7 @@
 usage(void)
 {
     fprintf(stderr, "%s\n%s\n",
-	"usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] [-C chrootdir]",
+	"usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix]",
 	"               pkg-name [pkg-name ...]");
     exit(1);
 }

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/perform.c#3 (text+ko) ====


==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/add/pkg_add.1#2 (text+ko) ====

@@ -27,7 +27,6 @@
 .Op Fl t Ar template
 .Op Fl p Ar prefix
 .Op Fl P Ar prefix
-.Op Fl C Ar chrootdir
 .Ar pkg-name Op Ar pkg-name ...
 .Sh DESCRIPTION
 The
@@ -223,32 +222,6 @@
 from stdin.
 The complete packing list is also read from stdin,
 and the contents then acted on as normal.
-.It Fl C , -chroot Ar chrootdir
-Before doing any operations,
-.Xr chroot 2
-to the
-.Ar chrootdir
-directory so that all package files, and the package database, are
-installed to
-.Ar chrootdir .
-Note that
-.Ar chrootdir
-needs to be a fairly complete file system, including everything normally
-needed by
-.Nm
-to run.
-This flag was added to help support operations done by
-.Xr sysinstall 8
-and is not expected to be useful for much else.
-Be careful that
-.Ar chrootdir
-is properly configured and cannot be modified by normal users,
-versions of commands like
-.Xr fetch 1
-may be run inside
-.Ar chrootdir
-as a side effect.
-.El
 .Pp
 One or more
 .Ar pkg-name



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004110603.o3B632kY084806>