From owner-freebsd-bugs Wed Sep 25 12:30: 7 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90DFE37B401 for ; Wed, 25 Sep 2002 12:30:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AB7B43E4A for ; Wed, 25 Sep 2002 12:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8PJU3Co000698 for ; Wed, 25 Sep 2002 12:30:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8PJU3lm000697; Wed, 25 Sep 2002 12:30:03 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5791437B401 for ; Wed, 25 Sep 2002 12:25:42 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15F0D43E42 for ; Wed, 25 Sep 2002 12:25:42 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g8PJPf7R089692 for ; Wed, 25 Sep 2002 12:25:41 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g8PJPfFw089691; Wed, 25 Sep 2002 12:25:41 -0700 (PDT) Message-Id: <200209251925.g8PJPfFw089691@www.freebsd.org> Date: Wed, 25 Sep 2002 12:25:41 -0700 (PDT) From: Tony Bridges To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/43368: pkg_create fails if target directory does not exist Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43368 >Category: misc >Synopsis: pkg_create fails if target directory does not exist >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 25 12:30:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Tony Bridges >Release: 4.6 >Organization: Sandvine Inc. >Environment: FreeBSD bsd-make.sandvine.com 4.6-STABLE FreeBSD 4.6-STABLE #37: Mon Sep 16 10:05:56 EDT 2002 root@TPC-E1-29:/usr/obj/usr/src/sys/TPC i386 >Description: When creating a package, pkg_create tries to cwd to the destination directory. If that directory does not exist (which can occur when the @cwd source is overridden with @srcdir immediately after the @cwd), the pkg_create fails. >How-To-Repeat: Create a package of the following form: pkg-plist : @name test @pkgdep unixODBC-2.2.0 @pkgdep postgresql-unixodbc-7.2.1_1 @owner sv @group sv @cwd /usr/local/vendor/test @srcdir /home/user/source/test @mode u=x,go= test @mode u=r,go= test.ini @cwd /usr/local/etc/rc.d @srcdir /home/user/source/test test.sh will fail when /usr/local/vendor/test does not exist on the source machine. The validity of the @cwd is checked immedia tely, without regard for the fact that it is overridden with @srcdir before it is used. >Fix: create dummy directories on the machine before running pkg_create. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message