Subject: Re: YASQ
To: None <current-users@NetBSD.ORG>
From: Mike Long <mike.long@analog.com>
List: current-users
Date: 03/11/1996 15:20:26
>Date: Mon, 11 Mar 1996 05:06:24 -0800
>From: Greg Earle <earle@isolar.Tujunga.CA.US>

>In the past couple of days, I've started to get
>
>SUP: Unable to delete directory src/gnu/lib/libg++/genclass
>
>Is this simply because I am using "/usr/obj" and the aforementioned directory
>now contains a "obj" symlink to /usr/obj/gnu/lib/libg++/genclass which was
>not created by SUP?

Yes.  Sup tries to rmdir() the directory, and fails because the obj
link is present (ENOTEMPTY).

>I'm making the tacit assumption that when SUP warns me it couldn't delete a
>directory, that's my cue to manually nuke it myself.  But I can't help but
>think that This Isn't Quite Right.  (I have "delete" in my sup files btw ... )

If you want this to work right (by your interpretation), you need to
do one of:

1) Separate your sup and build trees.
2) Don't use obj dirs, and 'make cleandir' in /usr/src before supping.

I'd prefer that sup be left alone in this case.  I always use sup's -v
flag, so that when I see 'unable to delete directory...' I can clean
up that directory and the corresponding directory under /usr/obj.
Altering sup to do all that itself would tie it too closely to the
NetBSD tree organization, IMHO, and would probably P.O. someone else.
-- 
Mike Long <mike.long@analog.com>     <URL:http://www.shore.net/~mikel>
VLSI Design Engineer         finger mikel@shore.net for PGP public key
Analog Devices, CPD Division          CCBF225E7D3F7ECB2C8F7ABB15D9BE7B
Norwood, MA 02062 USA       (eq (opinion 'ADI) (opinion 'mike)) -> nil