>Submitter-Id:   net
>Originator:     Dmitry Morozovsky <[EMAIL PROTECTED]>
>Organization:  Cronyx Plus LLC (RiNet ISP)
>Confidential:  no
>Synopsis:      bug in tag code when repository is readonly and val-tags exists
>Severity:      serious
>Priority:      medium
>Category:      cvs
>Class:         sw-bug 
>Release:       cvs-1.11
>Environment:

System: FreeBSD 4-STABLE, i386


>Description:

When:
- val-tags file exists in CVSROOT, and
- repository is readonly (in my case, on -ro NFS filesystem), and
- checkout is performed on some tag, and
- this tag is valid and does not exist in val-tags

cvs exits with error:

cvs [checkout aborted]: cannot write /.../CVSROOT/val-tags: Read-only file system


>How-To-Repeat:

        mount Repository with CVSROOT/val-tags readonly
        make sure you have valid tag in repository tree and not in val-tags
        do the following:

cvs -R get -r VALID_BUT_NOT_IN_VALTAGS module

>Fix:

Just do not try to modify val-tags when readonlyfs is set: 

Index: src/contrib/cvs/src/tag.c
===================================================================
RCS file: /pub/FreeBSD/ncvs/src/contrib/cvs/src/tag.c,v
retrieving revision 1.1.1.6.2.1
diff -u -r1.1.1.6.2.1 tag.c
--- src/contrib/cvs/src/tag.c   2000/10/31 09:37:58     1.1.1.6.2.1
+++ src/contrib/cvs/src/tag.c   2001/04/22 14:15:48
@@ -868,7 +868,8 @@
        /* The tags is valid but not mentioned in val-tags.  Add it.  */
        datum value;

-       if (noexec)
+       /* Do not try to add tags if our repository is read-only */
+       if (noexec || readonlyfs)
        {   
            if (db != NULL)
                dbm_close (db);

_______________________________________________
Bug-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-cvs

Reply via email to