Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 07:59:01 -0700
From:      "John W. De Boskey" <jwd@FreeBSD.org>
To:        Current List <freebsd-current@FreeBSD.org>
Subject:   Passing -I option to dependant pkg_add invocations
Message-ID:  <20010823075901.A96823@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hi,

   Currently, the only option passed on to dependant
pkg_add invocations is the '-v' verbose option. During an
automated install, we use the '-I' option to ignore
any pre/post installation scripts for certain packages.

   The following patch allows the '-I' option to
be passed on to dependant pkg_add invocations:

http://people.freebsd.org/~jwd/perform.c.patch

   A pasted copy is below (typical tabbing issues).

Thanks,
John



Index: perform.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pkg_install/add/perform.c,v
retrieving revision 1.65
diff -u -r1.65 perform.c
--- perform.c   2001/08/15 14:22:01     1.65
+++ perform.c   2001/08/23 14:27:36
@@ -260,7 +260,8 @@
                    if (cp) {
                        if (Verbose)
                            printf("Loading it from %s.\n", cp);
-                       if (vsystem("pkg_add %s'%s'", Verbose ? "-v " : "", cp)) {
+                       if (vsystem("pkg_add %s%s'%s'", NoInstall ? "-I " : "",
+                           Verbose ? "-v " : "", cp)) {
                            warnx("autoload of dependency '%s' failed%s",
                                cp, Force ? " (proceeding anyway)" : "!");
                            if (!Force)
@@ -283,7 +284,8 @@
                        if (!Force)
                            ++code;
                    }
-                   else if (vsystem("(pwd; cat +CONTENTS) | pkg_add %s-S", Verbose ? "-v " : "")) {
+                   else if (vsystem("(pwd; cat +CONTENTS) | pkg_add %s%s-S",
+                       NoInstall ? "-I " : "", Verbose ? "-v " : "")) {
                        warnx("pkg_add of dependency '%s' failed%s",
                                p->name, Force ? " (proceeding anyway)" : "!");
                        if (!Force)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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