Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99493 - etc-update problem w/ updating unmerged configuration files
Summary: etc-update problem w/ updating unmerged configuration files
Status: VERIFIED NEEDINFO
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-19 01:04 UTC by Toralf Förster
Modified: 2006-07-19 04:56 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 Toralf Förster gentoo-dev 2005-07-19 01:04:20 UTC
from etc-update:

...
4) Show differences again
Please select from the menu above (-1 to ignore this update): 1
Replacing /etc/X11/app-defaults/XLock with /etc/X11/app-defaults/._cfg0000_XLock
...
But because there was no  /etc/X11/app-defaults/XLock file before it cannot be
replaced.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-19 01:41:10 UTC
If there was no /etc/X11/app-defaults/XLock before, there would be no
._cfg0000_XLock. So, please explain better.
Comment 2 Toralf Förster gentoo-dev 2005-07-19 02:13:19 UTC
"Replacing _foo_ with _bar_" should be better written as "Renaming _foo_ to 
_bar_" because there is nothing to "replace" in that case
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-07-19 02:20:51 UTC
(In reply to comment #2)
> "Replacing _foo_ with _bar_" should be better written as "Renaming _foo_ to 
> _bar_" because there is nothing to "replace" in that case

What do you mean "there is nothing to replace"? Where did the updated
configuration file come from then? I really don't understand you request.
Comment 4 Toralf Förster gentoo-dev 2005-07-19 02:46:28 UTC
Thinking a bit longer about this of course your right - at the point where etc-
update is acting, there should exists a file which has to be replaced by a 
newer version.

I know it is strange but I am sure that there was no /etc/X11/app-
defaults/XLock before.

Closing this bug until I discover it again.
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2005-07-19 05:56:17 UTC
/usr/X11R6/lib/X11/app-defaults is a symlink to /etc/X11/app-defaults. Older
versions of xlockmore install /usr/X11R6/lib/X11/app-defaults/XLock. Newer
versions of xlockmore install /etc/X11/app-defaults/XLock. So when the new
version is installed, it installs /etc/X11/app-defaults/._cfg0000_XLock (since
/etc/X11/app-defaults/XLock still exists and it's protected), but when the old
version is cleaned out immediately afterwards,
/usr/X11R6/lib/X11/app-defaults/XLock is removed (since it's unchanged and
unprotected), leaving /etc/X11/app-defaults/._cfg0000_XLock without the original
XLock file.

I don't know if changing the wording for this very rare case is worth the
effort, though.
Comment 6 Toralf Förster gentoo-dev 2005-07-19 07:52:56 UTC
(In reply to comment #5)
> I don't know if changing the wording for this very rare case is worth the
> effort, though.

The author of etc-upate should be aware of the fact that indeed there could be a
.cfg_* file without the original. This -rare- case could result in an unexpected
error if a command to backup the original file fails.
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2005-07-19 09:20:55 UTC
The original file is never backed up anyway, so that is not a problem. But
etc-update does behave strangely when the user chooses to merge, and deletes
without special warning if the user wishes to keep the original file.
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2006-07-19 04:06:08 UTC
Not really sure how to classify this one, also the original report is missing the actual problem ("But because there was no  /etc/X11/app-defaults/XLock file before it cannot be replaced." is hardly a useful problem description here).
Also the symlink seems to be gone by now.
Comment 9 Toralf Förster gentoo-dev 2006-07-19 04:56:53 UTC
Sorry for the bad original report.

What I meant is that etc-update should use the term "Replacing" only if it would replace an existing config file wit a new one.

This bug is obsolete if /etc/._cfg0000_foo* is created only in cases where /etc/foo is not automatically created or overwritten by emerge.

That seems now to be true so I close this bug now.