[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
side
> 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
see:
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
[2])
return 0;
}
-#if HAVE_LUTIMES
+ /* On Linux, lutimes is a thin wrapper around utimensat, so there is
+ no point trying lutimes if utimensat failed with ENOSYS. */
+#if HAVE_LUTIMES && !HAVE_UTIMENSAT
{
struct timeval timeval[2];
struct timeval const *t;
@@ -437,7 +439,7 @@ lutimens (char const *file, struct timespec const timespec
[2])
return lutimes (file, t);
}
-#endif /* HAVE_LUTIMES */
+#endif /* HAVE_LUTIMES && !HAVE_UTIMENSAT */
/* Out of luck for symlinks, but we still handle regular files. */
if (!(adjustment_needed || REPLACE_FUNC_STAT_FILE) && lstat (file, &st))
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", (continued)
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Ondřej Vašík, 2009/11/23
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Jim Meyering, 2009/11/23
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Jim Meyering, 2009/11/23
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Pádraig Brady, 2009/11/23
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Jim Meyering, 2009/11/23
- Re: Build failures of coreutils-8.1 in Fedora build system "koji", Pádraig Brady, 2009/11/23
Re: Build failures of coreutils-8.1 in Fedora build system "koji", Ondřej Vašík, 2009/11/24