You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marc Aushold <re...@yahoo.de> on 2006/10/26 12:49:51 UTC

checkout fails due to missing temp dir

Hi all,

I just installed subversion 1.4.0 on Apache 2.0 and Suse 9.2. 
Configure, make and install went fine. I can import files with TortoiseSVN via DAV, but I 
cannot check them out because of following error:

svn co -r HEAD https://localhost/rep
 svn: REPORT request failed on '/rep/!svn/vcc/default' 
 svn: Can't find a temporary directory

/tmp and /var/tmp are writable for all, what does this error mean? I 
searched the web for over two weeks now, I have no imagination what could 
be wrong, maybe someone experienced the same message before?

I just rebuilt the sources with apr 1.2.7, but that did not solve the 
problem. I do not know what to do next.

Hope someone can help...


 		
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das  neue Yahoo! Mail .

Re: checkout fails due to missing temp dir

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/27/06, Marc Aushold <re...@yahoo.de> wrote:
> Thanks, Kenneth. I could have even hit on it on my own ;). So i did what you
> suggested, and I found the error message here:
>
> subversion\libsvn_subr\.svn\text-base\io.c (line 619)
>
> Its inside the small function svn_io_temp_dir:
>
> svn_error_t *
> svn_io_temp_dir(const char **dir,
>                 apr_pool_t *pool)
> {
>   apr_status_t apr_err = apr_temp_dir_get(dir, pool);
>
>   if (apr_err)
>     return svn_error_wrap_apr(apr_err, _("Can't find a temporary
> directory"));
>
>   *dir = svn_path_canonicalize(*dir, pool);
>
>   return svn_path_cstring_to_utf8(dir, *dir, pool);
> }
>
> So the error appears at the call of apr_temp_dir_get what is a function of
> the apr. I already suspected APR as reason of the error, grrr.
>
> First question: Is SVN incorrectly configured to APR? I think 'make' should
> have failed, if that function ist unknown...

What makes you say it's unknown?  If the function wasn't there then
you would get a linker error, not this kind of problem.  What seems to
be happening is that APR is failing to find your temp directory.
Something within that function is causing it to return an error.

> The function code is below, second question is if there is a possibility to
> get the error message of the APR function - is it logged anywhere? I am a
> linux novice and have problems to see through the logging mechanisms... ;)

If you build Subversion with --enable-maintainer-mode it will include
more information in the error, including the underlying APR error
code, which might be helpful.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: checkout fails due to missing temp dir

Posted by Marc Aushold <re...@yahoo.de>.
Thanks, Kenneth. I could have even hit on it on my own ;). So i did what you suggested, and I found the error message here:

subversion\libsvn_subr\.svn\text-base\io.c (line 619)

Its inside the small function svn_io_temp_dir:

svn_error_t *
svn_io_temp_dir(const char **dir,
                apr_pool_t *pool)
{
  apr_status_t apr_err = apr_temp_dir_get(dir, pool);

  if (apr_err)
    return svn_error_wrap_apr(apr_err, _("Can't find a temporary directory"));

  *dir = svn_path_canonicalize(*dir, pool);

  return svn_path_cstring_to_utf8(dir, *dir, pool);
}

So the error appears at the call of apr_temp_dir_get what is a function of the apr. I already suspected APR as reason of the error, grrr.

First question: Is SVN incorrectly configured to APR? I think 'make' should have failed, if that function ist unknown...

The function code is below, second question is if there is a possibility to get the error message of the APR function - is it logged anywhere? I am a linux novice and have problems to see through the logging mechanisms... ;)

APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir, 
                                           apr_pool_t *p)
{
    apr_status_t apr_err;
    const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
    const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
    const char *dir;
    char *cwd;
    int i;

    /* Our goal is to find a temporary directory suitable for writing
       into.  We'll only pay the price once if we're successful -- we
       cache our successful find.  Here's the order in which we'll try
       various paths:

          $TMP
          $TEMP
          $TMPDIR
          "C:\TEMP"     (windows only)
          "SYS:\TMP"    (netware only)
          "/tmp"
          "/var/tmp"
          "/usr/tmp"
          P_tmpdir      (POSIX define)
          `pwd` 

       NOTE: This algorithm is basically the same one used by Python
       2.2's tempfile.py module.  */

    /* Try the environment first. */
    for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++) {
        char *value;
        apr_err = apr_env_get(&value, try_envs[i], p);
        if ((apr_err == APR_SUCCESS) && value) {
            apr_size_t len = strlen(value);
            if (len && (len < APR_PATH_MAX) && test_tempdir(value, p)) {
                dir = value;
                goto end;
            }
        }
    }

    /* Next, try a set of hard-coded paths. */
    for (i = 0; i < (sizeof(try_dirs) / sizeof(const char *)); i++) {
        if (test_tempdir(try_dirs[i], p)) {
            dir = try_dirs[i];
            goto end;
        }
    }
    
    /* Finally, try the current working directory. */
    if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
        if (test_tempdir(cwd, p)) {
            dir = cwd;
        goto end;
        }
    }

    /* We didn't find a suitable temp dir anywhere */
    return APR_EGENERAL;

end:
    *temp_dir = apr_pstrdup(p, dir);
    return APR_SUCCESS;
}

Kenneth Porter <sh...@sewingwitch.com> schrieb: --On Thursday, October 26, 2006 2:49 PM +0200 Marc Aushold 
 wrote:

> I just rebuilt the sources with apr 1.2.7, but that did not solve the
> problem. I do not know what to do next.

I recommend grepping the sources for the error message, then looking around 
it in the source to see what the logic there might be complaining about. 
(My editor, Lugaru Epsilon, can grep an entire directory tree of source, 
which makes it easy to find this kind of thing.)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



 		
---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.

Re: checkout fails due to missing temp dir

Posted by Kenneth Porter <sh...@sewingwitch.com>.
--On Thursday, October 26, 2006 2:49 PM +0200 Marc Aushold 
<re...@yahoo.de> wrote:

> I just rebuilt the sources with apr 1.2.7, but that did not solve the
> problem. I do not know what to do next.

I recommend grepping the sources for the error message, then looking around 
it in the source to see what the logic there might be complaining about. 
(My editor, Lugaru Epsilon, can grep an entire directory tree of source, 
which makes it easy to find this kind of thing.)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org