Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2002 12:25:41 -0700 (PDT)
From:      Tony Bridges <tbridges@sandvine.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/43368: pkg_create fails if target directory does not exist
Message-ID:  <200209251925.g8PJPfFw089691@www.freebsd.org>

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

>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




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