From owner-svn-src-head@FreeBSD.ORG Fri Feb 10 00:26:28 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29CC8106566B; Fri, 10 Feb 2012 00:26:28 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 4B10E8FC16; Fri, 10 Feb 2012 00:26:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q1A0QPSb080006; Fri, 10 Feb 2012 04:26:25 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q1A0QPjA080005; Fri, 10 Feb 2012 04:26:25 +0400 (MSK) (envelope-from ache) Date: Fri, 10 Feb 2012 04:26:24 +0400 From: Andrey Chernov To: Eitan Adler Message-ID: <20120210002623.GA79894@vniz.net> Mail-Followup-To: Andrey Chernov , Eitan Adler , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201202092051.q19Kp3pj028436@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201202092051.q19Kp3pj028436@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r231300 - head/usr.sbin/pkg_install/create X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2012 00:26:28 -0000 On Thu, Feb 09, 2012 at 08:51:03PM +0000, Eitan Adler wrote: > /* Prefix should add an @cwd to the packing list */ > - if (Prefix) > - add_plist_top(&plist, PLIST_CWD, Prefix); > + if (Prefix) { > + char resolved_prefix[PATH_MAX]; > + if (realpath(Prefix, resolved_prefix) != 0) > + err(EXIT_FAILURE, "couldn't resolve path for prefix: %s", Prefix); > + add_plist_top(&plist, PLIST_CWD, resolved_prefix); > + } This change cause "pkg_create: couldn't resolve path for prefix: /usr/local: No such file or directory" because test condition should really be: if (realpath(Prefix, resolved_prefix) == NULL) (and realpath(3) returns char *) -- http://ache.vniz.net/