Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jun 1998 16:51:08 -0700
From:      John Polstra <jdp@polstra.com>
To:        peter@FreeBSD.ORG
Cc:        committers@FreeBSD.ORG, asami@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/nfs nfs_vnops.c
Message-ID:  <199806032351.QAA10678@austin.polstra.com>
In-Reply-To: <199805311924.MAA09103@freefall.freebsd.org>
References:  <199805311924.MAA09103@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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?
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth

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?199806032351.QAA10678>