From jdc@koitsu.dyndns.org  Fri May 25 04:05:15 2012
Return-Path: <jdc@koitsu.dyndns.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2B6A9106566B
	for <freebsd-gnats-submit@freebsd.org>; Fri, 25 May 2012 04:05:15 +0000 (UTC)
	(envelope-from jdc@koitsu.dyndns.org)
Received: from qmta15.westchester.pa.mail.comcast.net (qmta15.westchester.pa.mail.comcast.net [76.96.59.228])
	by mx1.freebsd.org (Postfix) with ESMTP id CC03A8FC0A
	for <freebsd-gnats-submit@freebsd.org>; Fri, 25 May 2012 04:05:13 +0000 (UTC)
Received: from omta07.westchester.pa.mail.comcast.net ([76.96.62.59])
	by qmta15.westchester.pa.mail.comcast.net with comcast
	id E43q1j0091GhbT85F446Lj; Fri, 25 May 2012 04:04:06 +0000
Received: from koitsu.dyndns.org ([67.180.84.87])
	by omta07.westchester.pa.mail.comcast.net with comcast
	id E4451j00N1t3BNj3T446T3; Fri, 25 May 2012 04:04:06 +0000
Received: by icarus.home.lan (Postfix, from userid 1000)
	id A3A2A73A33; Thu, 24 May 2012 21:04:05 -0700 (PDT)
Message-Id: <20120525040405.A3A2A73A33@icarus.home.lan>
Date: Thu, 24 May 2012 21:04:05 -0700 (PDT)
From: Jeremy Chadwick <jdc@koitsu.org>
Reply-To: Jeremy Chadwick <jdc@koitsu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Extraneous directories left over after installworld when using WITHOUT_CLANG
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         168327
>Category:       misc
>Synopsis:       Extraneous directories left over after installworld when using WITHOUT_CLANG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 04:10:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 9.0-STABLE FreeBSD 9.0-STABLE #0: Thu May 17 03:03:41 PDT 2012 root@icarus.home.lan:/usr/obj/usr/src/sys/X7SBA_RELENG_9_amd64 amd64
>Description:
	Using WITHOUT_CLANG=true in /etc/src.conf presently results in
	some directories getting created (which probably shouldn't)
	during installworld, as well as some directories not being
	deleted during "make delete-old".

	I should note that this problem began after the llvm/clang 3.1
	preparation import within the past few days.

root@icarus:/usr/src # make delete-old
>How-To-Repeat:
	1. csup to latest sources (a few minutes ago)
	2. Make sure WITHOUT_CLANG=true is in src.conf
	3. Go through usual procedure of building world/kernel and installing them
	4. make delete-old
>Fix:
	Only workaround I know of is, after running make delete-old,
	do the following:

	rm -fr /usr/include/clang

	The other directories in /usr/share/doc get deleted by delete-old, but
	my point is that they shouldn't be created if WITHOUT_CLANG is in use.
>Release-Note:
>Audit-Trail:
>Unformatted:
 >>> Removing old files (only deletes safe to delete libs)
 >>> Old files removed
 >>> Removing old directories
 rmdir: /usr/include/clang: Directory not empty
 /usr/share/doc/llvm/clang
 /usr/share/doc/llvm
 >>> Old directories removed
 
 root@icarus:/usr/src # ls -FRal /usr/include/clang
 total 16
 drwxr-xr-x   3 root  wheel   512 May 24 20:54 ./
 drwxr-xr-x  53 root  wheel  5632 May 24 20:54 ../
 drwxr-xr-x   2 root  wheel   512 May 24 20:54 3.1/
 
 /usr/include/clang/3.1:
 total 8
 drwxr-xr-x  2 root  wheel  512 May 24 20:54 ./
 drwxr-xr-x  3 root  wheel  512 May 24 20:54 ../
 
 	Based on what I can tell, the problems is that the following
 	directories are being blindly created during installworld phase
 	with no regard for WITHOUT_CLANG:
 
 	/usr/include/clang
 	/usr/include/clang/3.1
 	/usr/share/doc/llvm
 	/usr/share/doc/llvm/clang
 
 	I imagine whoever did the 3.1 import did not fully modify all
 	the necessary Makefile bits to keep this from happening.  But
 	the 3.0 stuff previously worked fine / did not leave leftover
 	cruft.
