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

Bug 557118

Summary: dispatch-conf repeatedly deletes configuration updates when configured to use rcs
Product: Portage Development Reporter: Stuart Shelton <srcshelton>
Component: Core - External InteractionAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Stuart Shelton 2015-08-09 10:56:45 UTC
I have configured dispatch-conf to use rcs, and have set the archive directory to be hidden.  I then reset permissions on this directory as follows:

$ sudo find /etc/.config-archive/ -type f -exec chmod a-w {} +
$ sudo find /etc/.config-archive/ -type d -exec chmod a-w {} +

... and then immediately ran:

$ sudo dispatch-conf
rcs: RCS file /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php,v is in use
ci: RCS file /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php,v is in use
/etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php,v  -->  /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php
revision 1.1.1.1
writable /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php exists; remove it? [ny](n): ^Z
[1]+  Stopped                 sudo dispatch-conf
$ ls -l /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php*
-rw-r--r-- 1 root root 3.8K Aug  2 22:35 /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php
-rw------- 1 root root    0 Aug  9 11:43 /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.phpEVUnbh
-r--r--r-- 1 root root  12K May  9 12:04 /etc/.config-archive/var/www/localhost/htdocs/wordpress/wp-config.php,v

... at which point the best course of action is unclear: interrupting the process with ctrl+c results in the updated file being lost.  Taking the default answer of 'n' results in the updated file being lost.  It turns out that you have to take the non-default 'y' option in order to not have the updated unmerged file erased.

Why, though, are writable files being created in the RCS archive directory if RCS can't handle this silently/automatically?

This behaviour appears to be 100% repeatable for wordpress configuration files, but doesn't appear to happen for files in /etc/ - is the location of the original file (or any symlinks along that path) causing incorrect behaviour?

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.2.20::gentoo was built with the following:
USE="(ipc) xattr -build -doc -epydoc (-selinux)" LINGUAS="-ru" PYTHON_TARGETS="python2_7 (-pypy) -python3_3 -python3_4"
Comment 1 Zac Medico gentoo-dev 2015-08-09 21:32:28 UTC
Does rcs work with symlinks? Otherwise, the symlink support added for bug 485598 might cause problems with rcs.