Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 173284

Summary: etc-update should ignore ".svn" and ".cvs" directories (and maybe others)
Product: Portage Development Reporter: Thomas Schweikle <tps>
Component: ToolsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement CC: remy
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 216231    
Attachments: make etc-update and dispatch-conf ignore hidden directories

Description Thomas Schweikle 2007-04-03 20:36:22 UTC
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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-03 22:21:52 UTC
Not an infra bug. etc-update is part of portage.
Comment 2 SpanKY gentoo-dev 2007-04-03 22:47:24 UTC
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 Remy Blank 2007-05-05 08:16:30 UTC
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 Thomas Schweikle 2007-05-05 20:04:24 UTC
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 Remy Blank 2007-05-06 10:53:53 UTC
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 Till Korten 2008-03-08 16:25:17 UTC
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 Zac Medico gentoo-dev 2008-11-15 06:07:31 UTC
Created attachment 171777 [details, diff]
make etc-update and dispatch-conf ignore hidden directories

Both etc-update and dispatch-conf ignore hidden directories, in svn r11927:11929.
Comment 8 Zac Medico gentoo-dev 2008-11-22 05:50:49 UTC
This is fixed in 2.2_rc15.