From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 5 18:10:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2A6F16A421 for ; Sat, 5 Jan 2008 18:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F33F213C455 for ; Sat, 5 Jan 2008 18:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m05IA1WX019957 for ; Sat, 5 Jan 2008 18:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m05IA1nH019956; Sat, 5 Jan 2008 18:10:01 GMT (envelope-from gnats) Resent-Date: Sat, 5 Jan 2008 18:10:01 GMT Resent-Message-Id: <200801051810.m05IA1nH019956@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7172016A417 for ; Sat, 5 Jan 2008 18:06:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 82AB413C457 for ; Sat, 5 Jan 2008 18:06:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m05I62cj006021 for ; Sat, 5 Jan 2008 18:06:02 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m05I62Xb006020; Sat, 5 Jan 2008 18:06:02 GMT (envelope-from nobody) Message-Id: <200801051806.m05I62Xb006020@www.freebsd.org> Date: Sat, 5 Jan 2008 18:06:02 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/119368: [PATCH] pkg_add(1) doesn't keep dependent packages with -K flag X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2008 18:10:02 -0000 >Number: 119368 >Category: misc >Synopsis: [PATCH] pkg_add(1) doesn't keep dependent packages with -K flag >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 05 18:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: Affects FreeBSD 4.x~5.x+ >Organization: n/a >Environment: n/a >Description: pkg_add(1) in its current form doesn't keep The 'bug' is a usage bug, and is solved using the following patch: . The patch was originally requested by Maslan [1], and due to lack of feedback a PR wasn't filed. This trivial patch has been tested and is functionally correct, as noted by Jason C Wells [2]. Please note that the link above will only be available until March~April 2008 as I have graduated and my student account at the University of Washington will expire then. 1. hackers@ discussion thread: . 2. ports@ discussion thread: . >How-To-Repeat: n/a >Fix: See link/enclosed patch noted. Patch attached with submission follows: --- add/perform.c 2007-11-09 18:46:02.000000000 -0800 +++ add/perform.c.old 2007-11-09 18:44:10.000000000 -0800 @@ -343,7 +343,7 @@ if (!Force) ++code; } - else if (vsystem("(pwd; /bin/cat +CONTENTS) | %s %s %s %s -S", PkgAddCmd, Verbose ? "-v" : "", PrefixRecursive ? prefixArg : "", KeepPackage ? "-K" : "")) { + else if (vsystem("(pwd; /bin/cat +CONTENTS) | %s %s %s -S", PkgAddCmd, Verbose ? "-v" : "", PrefixRecursive ? prefixArg : "")) { warnx("pkg_add of dependency '%s' failed%s", p->name, Force ? " (proceeding anyway)" : "!"); if (!Force) >Release-Note: >Audit-Trail: >Unformatted: