bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Symbolic links in CVSROOT


From: Chris Prior
Subject: Symbolic links in CVSROOT
Date: Thu, 13 Jun 2002 16:48:53 +0100

When running `cvs rtag` we hit the following assert problem:

$ cvs rtag firsttag com
lock.c:178: failed assertion `strncmp (repository,
current_parsed_root->directory, strlen (current_parsed_root->directory)) ==
0'
cvs [rtag aborted]: received abort signal

We searched the bug lists and noted that this was a known problem, so
downloaded and built the latest version, 1.11.2, to try to correct this.
Unfortunately the bug stills seems to be there.

Added a few debug lines to lock.c: (replacing assert with if stmt)

static char *
lock_name (repository, name)
    char *repository;
    char *name;
{
    char *retval;
    char *p;
    char *q;
    char *short_repos;
    mode_t save_umask;
    int saved_umask = 0;

    if (lock_dir == NULL)
    {
        /* This is the easy case.  Because the lock files go directly
           in the repository, no need to create directories or anything.  */
        retval = xmalloc (strlen (repository) + strlen (name) + 10);
        (void) sprintf (retval, "%s/%s", repository, name);
    }
    else
    {
        struct stat sb;
        mode_t new_mode = 0;

        /* The interesting part of the repository is the part relative
           to CVSROOT.  */
        assert (current_parsed_root != NULL);
        assert (current_parsed_root->directory != NULL);

#ifdef NOGPVSTUFF
        assert (strncmp (repository, current_parsed_root->directory,
                         strlen (current_parsed_root->directory)) == 0);
#else
        if (!(strncmp (repository, current_parsed_root->directory,
                      strlen (current_parsed_root->directory)) == 0))
          {
            printf("In lock.c, root directory is not a substring of
repository: \n  repository=%s\n  current_parsed_root->directory=%s\n",
                   repository, 
                   current_parsed_root->directory);
            exit(1);
          }
#endif

        short_repos = repository + strlen (current_parsed_root->directory) +
1;

...

The output of this is:


$ /usr/local/src/cvs-1.11.2/src/cvs rtag firsttag com
In lock.c, root directory is not a substring of repository: 
  repository=/space2/users/cvsroot/com
  current_parsed_root->directory=/users/cvsroot

$ echo $CVSROOT
/users/cvsroot

$ df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/proc                      0       0       0     0%    /proc
/dev/dsk/c0t0d0s0    2307790 1715644  545991    76%    /
fd                         0       0       0     0%    /dev/fd
swap                  927048   92288  834760    10%    /tmp
/dev/dsk/c0t0d0s5    4131384 3685551  404520    91%    /oldapps
/dev/dsk/c0t0d0s3    2014303 1624812  329062    84%    /u02
/dev/dsk/c0t1d0s3    2055705 1996626       0   100%    /oldusers
/dev/dsk/c0t1d0s4    2055705 1506519  487515    76%    /u01
/dev/dsk/c0t1d0s5    3327193 2536675  757247    78%    /space1
/dev/dsk/c0t2d0s0    17413250 9662970 7576148    57%    /space2

$ ls -l /users
lrwxrwxrwx   1 root     other         13 May  9 13:36 /users ->
/space2/users

--
chris prior
software engineer
ntl: business
01256 754202



--
chris prior
software engineer
ntl: business



The contents of this email and any attachments are sent for the personal 
attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited




reply via email to

[Prev in Thread] Current Thread [Next in Thread]