From owner-freebsd-current Thu Aug 23 7:59: 4 2001 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 87E2937B406; Thu, 23 Aug 2001 07:59:01 -0700 (PDT) Date: Thu, 23 Aug 2001 07:59:01 -0700 From: "John W. De Boskey" To: Current List Subject: Passing -I option to dependant pkg_add invocations Message-ID: <20010823075901.A96823@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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