Bug 173284 - etc-update should ignore ".svn" and ".cvs" directories (and maybe others)
Bug#: 173284 Product:  Portage Development Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: dev-portage@gentoo.org Reported By: tps@vr-web.de
Component: Tools
URL: 
Summary: etc-update should ignore ".svn" and ".cvs" directories (and maybe others)
Keywords:  InSVN
Status Whiteboard: 
Opened: 2007-04-03 20:36 0000
Description:   Opened: 2007-04-03 20:36 0000
etc-update searches ".svn" and ".cvs" directories, but since these hold things
not intended for updates etc-update should ignore them. Maybe there are others
to be ignored for other revision control systems or deployment platforms.

CONFIG_PROTECT is not adequate to keep etc-update out of ".svn" or ".cvs".

In my opinion it would be best to have an additional environment variable
giving a list of directories files to be ignored. Ideally one which allows to
set patterns.

It may be enough to set

  find_opts="-iname ._cfg????_*"

to

  find_opts="\( -iname .svn -prune \) -o -iname ._cfg????_*"

to make it happen. But it would be more usefull to have it configurable. With a
default of ignoring ".svn" and ".cvs".


Reproducible: Always

Steps to Reproduce:
1. make /etc a svn or cvs checkout
2.
3.
Actual Results:  
".svn" or ".cvs" is searched for "._cfg????_*" files, but these directories may
not be searched at all, since they are used by svn or cvs.

Expected Results:  
".svn" or ".cvs" directories being ignored.

------- Comment #1 From Robin Johnson 2007-04-03 22:21:52 0000 -------
Not an infra bug. etc-update is part of portage.

------- Comment #2 From SpanKY 2007-04-03 22:47:24 0000 -------
wtf is a ".cvs" directory ?  cvs uses "CVS"

wonder if we can just be like any other tool ... ignore directories that start
with a .

i dont think anything installs a . dir on purpose ...

------- Comment #3 From Remy Blank 2007-05-05 08:16:30 0000 -------
This might be related to #164529. But I still don't get what the problem really
is (other than cosmetic and possibly in execution time).

------- Comment #4 From Thomas Schweikle 2007-05-05 20:04:24 0000 -------
Assume people using svn, cvs, or others to configure systems. Some centralized
system management software does the same. etc-update should ignore repository
files.

------- Comment #5 From Remy Blank 2007-05-06 10:53:53 0000 -------
Well, yes, I'm also using Subversion for /etc, but I don't have any problem
with etc-update. Could you describe precisely the behavior that's bothering
you?

------- Comment #6 From Till Korten 2008-03-08 16:25:17 0000 -------
I am having the same problem.
I just had the case that etc-update updated a file in a .svn directory
(/etc/php/apache2-php5/.svn/text-base/php.ini.svn-base) this messed up my whole
subversion history because now subversion was missing a file (the one with the
number in front that etc-update normally uses as temporary files),
I had to completely wipe all .svn directories below /etc/, delete the old
subversion repository and create a new one.

the problem probably occurs when subversion starts to track local changes in
one of the temporary files.

I also agree that we need an option in etc-update.conf.
e.g.:

# versioning system users
# ignore versioning system diectories e.g. .svn for subversion
ignore_dirs=".svn"

------- Comment #7 From Zac Medico 2008-11-15 06:07:31 0000 -------
Created an attachment (id=171777) [details]
make etc-update and dispatch-conf ignore hidden directories

Both etc-update and dispatch-conf ignore hidden directories, in svn
r11927:11929.

------- Comment #8 From Zac Medico 2008-11-22 05:50:49 0000 -------
This is fixed in 2.2_rc15.