[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Linux exFAT checkout issue

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 21 Jul 2014 11:29:50 +0200

On Fri, Jul 18, 2014 at 03:09:31PM -0700, Nick Chadwick wrote:
> Hello, I just ran into a small issue checking out on Linux (Ubuntu 14.04)
> to an exFAT drive.
>
> The specific error I received was:
>
> svn: E000038: Can't set permissions on
> '/media/exFAT_drive/myrepo/.svn/tmp/svn-5fj4RP': Function not implemented
>
> I believe this issue stems from an incorrect check for why the permissions
> change failed. In subversion/libsvn_subr/io.c on line 895 this error is
> first detected from apr_file_perms_set(fname_apr, perms); And on line 955
> there is a check for APR_STATUS_IS_ENOTIMPL which unsets the error when it
> stems from APR platform issues.
>
> But I think in this case, its the actual filesystem, not APR, which doesn't
> support permissions changes, but svn dies out rather than ignoring the
> error.
>
> Regards,
>
> -Nick

Looks like I introduced this problem while improving tempfile handling
some years ago.

Can you try this patch, please?

Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 1611758)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -4675,8 +4675,25 @@ svn_io_open_unique_file3(apr_file_t **file,
    * case, but only if the umask allows it. */
   if (!using_system_temp_dir)
     {
+ svn_error_t *err;
+
       SVN_ERR(merge_default_file_perms(tempfile, &perms, scratch_pool));
- SVN_ERR(file_perms_set2(tempfile, perms, scratch_pool));
+ err = file_perms_set2(tempfile, perms, scratch_pool);
+ if (err)
+ {
+ if (APR_STATUS_IS_INCOMPLETE(err->apr_err) ||
+ APR_STATUS_IS_ENOTIMPL(err->apr_err))
+ svn_error_clear(err);
+ else
+ {
+ const char *message;
+ message = apr_psprintf(scratch_pool,
+ _("Can't set permissions on '%s'"),
+ svn_dirent_local_style(tempname,
+ scratch_pool));
+ return svn_error_quick_wrap(err, message);
+ }
+ }
     }
 #endif
 
Received on 2014-07-21 11:30:35 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.