Date: Thu, 04 Jun 1998 22:25:16 +0800 From: Peter Wemm <peter@netplex.com.au> To: John Polstra <jdp@polstra.com> Cc: committers@FreeBSD.ORG, asami@FreeBSD.ORG Subject: Re: cvs commit: src/sys/nfs nfs_vnops.c Message-ID: <199806041425.WAA24512@spinner.netplex.com.au> In-Reply-To: Your message of "Wed, 03 Jun 1998 16:51:08 MST." <199806032351.QAA10678@austin.polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <peter@netplex.com.au> Netplex Consulting To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806041425.WAA24512>