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

Re: checkout fails due to missing temp dir

From: Marc Aushold <rettkliff2_at_yahoo.de>
Date: 2006-10-27 10:45:49 CEST

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 <shiva@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.
Received on Fri Oct 27 10:46:39 2006

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.