Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557118 - dispatch-conf repeatedly deletes configuration updates when configured to use rcs
Summary: dispatch-conf repeatedly deletes configuration updates when configured to use...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-09 10:56 UTC by Stuart Shelton
Modified: 2015-08-09 21:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.