[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,
From: |
Jim Meyering |
Subject: |
Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps, |
Date: |
Mon, 24 Aug 2009 10:46:26 +0200 |
Pádraig Brady wrote:
> Jim Meyering wrote:
>> The "preserve symlink time stamps" feature in coreutils-7.5
>> is causing trouble in Fedora's build system,
>>
>> http://thread.gmane.org/gmane.linux.redhat.fedora.devel/119834
>>
>> because they use a kernel without utimensat support, yet configured/built
>> coreutils-7.5 in an environment that suggests (via link tests) that the
>> function is available. Here is the fix I expect to push soon:
>
>> diff --git a/src/copy.c b/src/copy.c
>> index bf9230b..8fc4b68 100644
>> --- a/src/copy.c
>> +++ b/src/copy.c
>> @@ -124,7 +124,13 @@ static inline int
>> utimens_symlink (char const *file, struct timespec const *timespec)
>> {
>> #if HAVE_UTIMENSAT
>> - return utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW);
>> + int err = utimensat (AT_FDCWD, file, timespec, AT_SYMLINK_NOFOLLOW);
>> + /* When configuring on a system with new headers and libraries, and
>> + running on one with a kernel that is old enough to lack the syscall,
>> + utimensat fails with ENOTSUP. Ignore that. */
>> + if (err && errno == ENOSYS)
>> + err = 0;
>> + return err;
>
> I was worried about that but thought it wasn't an issue
> as ENOTSUP was not mentioned in the man page :(
> http://www.kernel.org/doc/man-pages/online/pages/man2/utimensat.2.html
>
> Michael can we add ENOTSUP to utimensat(2) ?
Actually, the comment I added above has a typo.
s/ENOTSUP/ENOSYS/.
The diagnostic reported corresponds to ENOSYS.
The adjusted patch is here:
http://www.redhat.com/archives/fedora-devel-list/2009-August/msg01220.html
- [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Jim Meyering, 2009/08/24
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Pádraig Brady, 2009/08/24
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,,
Jim Meyering <=
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Kamil Dudka, 2009/08/24
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Jim Meyering, 2009/08/24
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Kamil Dudka, 2009/08/24
- Re: [PATCH] cp: ignore obscure failure to preserve symlink time stamps,, Ondřej Vašík, 2009/08/24