From owner-cvs-all Thu Jun 4 07:26:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA13936 for cvs-all-outgoing; Thu, 4 Jun 1998 07:26:00 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA13926; Thu, 4 Jun 1998 07:25:54 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.8.8/8.8.8/Spinner) with ESMTP id WAA24512; Thu, 4 Jun 1998 22:25:17 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199806041425.WAA24512@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: John Polstra cc: committers@FreeBSD.ORG, asami@FreeBSD.ORG Subject: Re: cvs commit: src/sys/nfs nfs_vnops.c In-reply-to: Your message of "Wed, 03 Jun 1998 16:51:08 MST." <199806032351.QAA10678@austin.polstra.com> Date: Thu, 04 Jun 1998 22:25:16 +0800 From: Peter Wemm Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk John Polstra wrote: > > peter 1998/05/31 12:24:20 PDT > > > > Modified files: > > sys/nfs nfs_vnops.c > > Log: > > Don't silently fail to set file flags. > > > > Obtained from: NetBSD > > > > Revision Changes Path > > 1.100 +8 -1 src/sys/nfs/nfs_vnops.c > > This breaks what may be a common situation when building ports. The > scenario is: > > /usr/ports/distfiles is mounted via NFS > > /cdrom contains a CD with some distfiles on it (e.g., disk 3 of > the 2.2.6 release set) > > You try to build a port whose distfile is on the CD but not yet > in /usr/ports/distfiles. > > The ports system executes "fetch" with a "file://..." URL to copy > the file from the CD into /usr/ports/distfiles. "fetch" in turn > executes a "cp -p". That tries to do a chflags on the destination > file. It fails because NFS returned EOPNOTSUPP. "cp" fails, > "fetch" fails, and the ports system goes out and gets the distfile > by FTP even though a perfectly good copy is on the CD. The FTP > fetch succeeds, because it doesn't attempt the chflags. > > Depending on your point of view, this could be viewed as a bug in > "cp", "fetch", NFS, or the ports system. :-) I personally would fix it > in "cp" so that EOPNOTSUPP from chflags(2) is treated as a harmless > warning. > > Do you agree? Yes, that's what I tried to do for install, I heard about it from Ken Merry @ plutotech when it busted their builds. However, I think a silent ignore of a failed chflags() isn't right. I made it so that EOPNOTSUPP printed a warning, everything else was a failure. After all, there's not much that you can do if the underlying fs or protocol doesn't support it, but it's not good to leave a user who's *assuming* that it's going to work with a false sense of security. Having said that, I am willing to be talked out of it and will take it back out if there's sentiment that it's a Bad Idea. Cheers, -Peter -- Peter Wemm Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message