>Number: 6446
>Category: system
>Synopsis: OpenCVS bails on CVS/Entries.Static files in the repository
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sat Aug 14 19:00:01 GMT 2010
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
System : OpenBSD 4.7
Details : OpenBSD 4.7 (GENERIC) #2: Sat Apr 3 00:56:40 PDT 2010
[email protected]:/usr/src/sys/arch/sparc64/compile/GENERIC
Architecture: OpenBSD.sparc64
Machine : sparc64
>Description:
When traversing a working directory, cvs_file_walkdir() checks for a
CVS/Entries.Static file to detect an incomplete checkout. This check
is also made when traversing a repository for commands like
rlog.
Obviously, CVS/ directories shouldn't exist in a repository. However
OpenCVS shouldn't be paying attention to them if they do.
>How-To-Repeat:
Compare the output of these two commands, with an OpenBSD CVS
repository at /cvsroot:
cvs -d /cvsroot rlog src | head
opencvs -d /cvsroot rlog src | head
>Fix:
The following patch skips the Entries.Static check for !CVS_USE_WDIR
commands. I believe this is correct based on my reading of the
source. It at least fixes rlog against OpenBSD src/ and doesn't appear
to change the behavior of update.
Index: file.c
===================================================================
RCS file: /cvsroot/src/usr.bin/cvs/file.c,v
retrieving revision 1.260
diff -u file.c
--- file.c 23 Jul 2010 21:46:05 -0000 1.260
+++ file.c 14 Aug 2010 18:30:03 -0000
@@ -596,7 +596,8 @@
xsnprintf(fpath, sizeof(fpath), "%s/%s", cf->file_path,
CVS_PATH_STATICENTRIES);
- if (stat(fpath, &st) == -1 || build_dirs == 1)
+ if (!(cmdp->cmd_flags & CVS_USE_WDIR) ||
+ stat(fpath, &st) == -1 || build_dirs == 1)
cvs_repository_getdir(repo, cf->file_path, &fl, &dl,
(cr->flags & CR_RECURSE_DIRS) ?
REPOSITORY_DODIRS : 0);
>Release-Note:
>Audit-Trail:
>Unformatted: