[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build failures of coreutils-8.1 in Fedora build system "koji"

From: Eric Blake
Subject: Re: Build failures of coreutils-8.1 in Fedora build system "koji"
Date: Tue, 24 Nov 2009 17:48:26 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> > Also, does utimensat(AT_FDCWD,"file",NULL,0) work, and it is just the
> > AT_SYMLINK_NOFOLLOW variant that fails with ENOSYS?  If so, I see at least
> > one problem in lib/utimens.c - it shares a static variable between
> > lutimens and fdutimens, which means that if lutimens detects
> > AT_SYMLINK_NOFOLLOW failure, then fdutimens fails to even try utimensat in
> > the future.
> This gnulib patch is necessary if you answer affirmatively to the above 
> question; If I'm correct, it will fix the touch/trailing-slash and gnulib 
> of things, but we would still need a patch to coreutils testsuite to ignore 
> ENOSYS failure in touch/no-dereference.

Oh, I see one more place that needs fixing.  I looked at your log again, and 

checking for lutimes... yes

But glibc implements lutimes as a wrapper around utimensat
(,AT_SYMLINK_NOFOLLOW), which is consistent with the strace you showed (two 
attempts at utimensat; our direct one, followed by our attempt at lutimes; 
immediately followed by failure).  Therefore, I need to squash this into the 
previous post.

diff --git i/lib/utimens.c w/lib/utimens.c
index 61221fd..55266d6 100644
--- i/lib/utimens.c
+++ w/lib/utimens.c
@@ -420,7 +420,9 @@ lutimens (char const *file, struct timespec const timespec
         return 0;

+  /* On Linux, lutimes is a thin wrapper around utimensat, so there is
+     no point trying lutimes if utimensat failed with ENOSYS.  */
     struct timeval timeval[2];
     struct timeval const *t;
@@ -437,7 +439,7 @@ lutimens (char const *file, struct timespec const timespec

     return lutimes (file, t);
-#endif /* HAVE_LUTIMES */

   /* Out of luck for symlinks, but we still handle regular files.  */
   if (!(adjustment_needed || REPLACE_FUNC_STAT_FILE) && lstat (file, &st))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]