From rjk@watson.grauel.com  Tue Jan  9 08:32:37 1996
Received: from public.wintek.com (public.wintek.com [199.233.104.88])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA20034
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 9 Jan 1996 08:32:36 -0800 (PST)
Received: from watson.grauel.com (watson.grauel.com [199.233.104.36])
	by public.wintek.com (8.6.12/1.15wintek(3.6davy)) with ESMTP
	id LAA09708; Tue, 9 Jan 1996 11:32:24 -0500
Received: (from rjk@localhost) by watson.grauel.com (8.6.12/8.6.9) id LAA02838; Tue, 9 Jan 1996 11:41:33 -0500
Message-Id: <199601091641.LAA02838@watson.grauel.com>
Date: Tue, 9 Jan 1996 11:41:33 -0500
From: Richard J Kuhns <rjk@watson.grauel.com>
Reply-To: rjk@grauel.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: problem with pkg_create under 2.1-RELEASE
X-Send-Pr-Version: 3.2

>Number:         941
>Category:       bin
>Synopsis:       pkg_create removes current directory if interupted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jkh
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan  9 08:40:04 PST 1996
>Closed-Date:    Wed May 8 02:22:37 PDT 1996
>Last-Modified:  Wed May  8 02:23:01 PDT 1996
>Originator:     Richard J Kuhns
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
Grauel Enterprises, Inc.
PO Box 6249
100 Sawmill Road
Lafayette, IN  47903
(317)477-6000 x319
>Environment:

A 2.1-RELEASE system updated from 2.0.5.

>Description:

Interupting pkg_create while it was creating the tarball apparently
removed the current directory.

I used the following script to run pkg_create:
===
#!/usr/local/bin/bash

BUILDDATE=`date +%m%d%Y`

rm -f /u/store/BUILD
echo $BUILDDATE > /u/store/BUILD

pkg_create -v -f +CONTENTS -c +COMMENT -d +DESC -i +INSTALL -r +REQUIRE StoreSys

exit 0
===
I hit control-c when I saw the error message from tar (see below); I
*didn't* wait for the command to finish.
==========transcript
: watson$~; cd Storesys/
: watson$~/Storesys; ./build_store_pkg 
Creating package StoreSys
Creating gzip'd tar ball in '/home/rjk/Storesys/StoreSys.tgz'
tar: can't add file bin/servout : No such file or directory ***^C***
tar command failed with code 2
: watson$~/Storesys; ls -CF
ls: .: No such file or directory
: watson$~/Storesys; cd ..
: watson$~; cd -
bash: -: No such file or directory
: watson$~; 
==========
>How-To-Repeat:

See the short files included with the description above...
I tried a second time, after restoring from a backup; it's repeatable.

>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: pst 
Responsible-Changed-When: Wed Feb 7 16:13:19 PST 1996 
Responsible-Changed-Why:  
State-Changed-From-To: open->analyzed 
State-Changed-By: jkh 
State-Changed-When: Thu Feb 8 00:58:23 PST 1996 
State-Changed-Why:  
This is a known problem and will be fixed as part of a general 
cleanup, to be committed shortly. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: jkh 
State-Changed-When: Wed May 8 02:22:37 PDT 1996 
State-Changed-Why:  
This was fixed. 

>Unformatted:
