Subject: install/10544: sysinst (really pax) unlinks directories
To: None <gnats-bugs@gnats.netbsd.org>
From: John Hawkinson <jhawk@mit.edu>
List: netbsd-bugs
Date: 07/08/2000 20:09:13
>Number:         10544
>Category:       install
>Synopsis:       sysinst (really pax) unlinks directories
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 08 20:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     John Hawkinson
>Release:        netbsd-1-5 of 20 June 2000
>Organization:
MIT
>Environment:
	
System: NetBSD zorkmid.mit.edu 1.5_ALPHA NetBSD 1.5_ALPHA (ZORKMID-$Revision: 1.15 $) #231: Fri Jul 7 19:41:21 EDT 2000 jhawk@zorkmid.mit.edu:/usr/local/netbsd-1-5/src/sys/arch/i386/compile/ZORKMID i386


>Description:
	While trying to upgrade my NetBSD 1.2_ALPHA system (ha, ha!),
	with a filesystem layout like:

/usr -> u1/usr
/var -> u1/var
/u1
  /u1/usr
  /u1/var

	sysinst would unlink /usr prior to extraction, thus
trying to write /usr/bin to /, overfilling the partition and
running out of space.
>How-To-Repeat:
	Use pax to extract a directory over a symlink, and watch it
unlink the symlink and create the directory.
>Fix:
	Not sure...perhaps pax should have an option to deal with case?
	A crude alternative would be to use:

		mkdir usr; pax -zr%spe -f %s -s ',^\./usr$'\,,'

	i.e. exclude /usr from the set of things extracted.

	Of course, it should be more generic. Perhaps extracting the list
	of directories and mkdir-ing them and then excluding them from
	extraction?

	Thoughts?

	If people think it's not worth fixing, I'd be curious about that,
	too.

>Release-Note:
>Audit-Trail:
>Unformatted: