View previous topic :: View next topic |
Author |
Message |
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 3:43 pm Post subject: cfg-update not not working correctly [Solved] |
|
|
I'm not sure exactly when or why, but 'cfg-update -u' no longer works consistently on my system.
When I run it it will identify the conflicting config files as normal, e.g.,:
Code: | 12/11/2024 07:28:32$ cfg-update -u
12/11/2024 07:28:52
Searching for updates...
<< Stage1 >> 0 files in queue for automatic replacing, skipping...
<< Stage2 >> 0 files in queue for automatic 3-way merging, skipping...
<< Stage3 >> 0 files in queue for manual 3-way merging, skipping...
<< Stage4 >> 2 files in queue for manual 2-way merging, starting...
(1/2) /etc/portage/package.use/steam *Custom File
* YOU ARE ABOUT TO UPDATE A CUSTOM FILE. YOU SHOULD ASK YOURSELF
* WHERE DOES IT COME FROM AND WHAT HAPPENDS WHEN YOU REPLACE IT?
* PORTAGE DID NOT INSTALL THE CURRENT FILE, MOST LIKELY IT HAS BEEN
* CREATED AFTER INSTALLATION AND IT MAY CONTAIN CUSTOM SETTINGS.
Press [y] - to merge the current file and the ._cfg0000_* file with kdiff3
Press [s] - to skip this update (to investigate first, and try again later)
Press [1] - to use the ._cfg0000_* file
Press [2] - to remove the ._cfg0000_* file
Press [q] - to quit cfg-update immediately
Merge manually with file : /etc/portage/package.use/._cfg0000_steam ? [y|s|1|2|q]
In kdiff3 you select the lines that you want to keep.
When done, click the save button and exit kdiff3!
When you exit kdiff3, cfg-update will finish the update... |
But when I enter 'y', it will bring up kdiff with an empty diff and a dialog that says 0 diffs were found. After clicking ok to the first dialog, a second dialog opens saying (in this example), "Opening of these files failed: /etc/portage/package.use/._cfg0000_steam"
Sometimes rebooting and trying again works and sometimes not. Does anyone know what's going on and how to fix it?
P.S. Sorry, if this posts more than once. After hitting submit I keep getting a message saying something like "Error in posting", and then I don't see my message in the forum. (It appears certain Unicode characters are not allowed and removing them let the post go through)
Last edited by mcnutty on Wed Dec 11, 2024 7:26 pm; edited 1 time in total |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1037 Location: Somewhere in Denmark
|
Posted: Wed Dec 11, 2024 4:05 pm Post subject: |
|
|
Permissions issue? - what user is running cfg-update? |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1963
|
Posted: Wed Dec 11, 2024 4:08 pm Post subject: |
|
|
Next time this happens, Choose 's' to skip and then examine both /etc/portage/package.use/steam and /etc/portage/package.use/._cfg0000_steam .
Consider both the contents and the permissions.
Often, files like these are the target of the --autounmask-write option. Personally, I manage my package.use files by hand and disable this functionality.
If you need further help, post the contents of both files here when it occurs again. |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 4:47 pm Post subject: |
|
|
The permissions look ok to me:
Code: | root>ls /etc/portage/package.use/steam
-rw-r--r-- 1 root root 2.1K Jul 28 17:05 /etc/portage/package.use/steam
root>ls /etc/portage/package.use/._cfg0000_steam
-rw-r--r-- 1 root root 2.2K Dec 11 07:25 /etc/portage/package.use/._cfg0000_steam |
And the contents are identical as far as I can tell:
Code: |
root>diff /etc/portage/package.use/._cfg0000_steam /etc/portage/package.use/._cfg0000_steam
[no output] |
I'm reading through the man page about the various autounmask options and they mostly make sense. I don't think I've ever explicitly enabled --autounmask (or any subflag). However, it's possible when I emerged steam (and a few other packages) it asked me if I wanted to automatically add the use flags and I said yes, even though I usually manually copy and paste them to new or existing files.
Is there a way to get back to managing all my use flags manually? |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 4:55 pm Post subject: |
|
|
freke wrote: | Permissions issue? - what user is running cfg-update? |
Running cfg-update as roo. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1339 Location: Richmond Hill, Canada
|
Posted: Wed Dec 11, 2024 4:58 pm Post subject: |
|
|
May be you want to review you test
your ls show very different size 2.1k vs 2.2k.
And you diff compare same file.
mcnutty wrote: | The permissions look ok to me:
Code: | root>ls /etc/portage/package.use/steam
-rw-r--r-- 1 root root 2.1K Jul 28 17:05 /etc/portage/package.use/steam
root>ls /etc/portage/package.use/._cfg0000_steam
-rw-r--r-- 1 root root 2.2K Dec 11 07:25 /etc/portage/package.use/._cfg0000_steam |
And the contents are identical as far as I can tell:
Code: |
root>diff /etc/portage/package.use/._cfg0000_steam /etc/portage/package.use/._cfg0000_steam
[no output] |
I'm reading through the man page about the various autounmask options and they mostly make sense. I don't think I've ever explicitly enabled --autounmask (or any subflag). However, it's possible when I emerged steam (and a few other packages) it asked me if I wanted to automatically add the use flags and I said yes, even though I usually manually copy and paste them to new or existing files.
Is there a way to get back to managing all my use flags manually? |
|
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 5:22 pm Post subject: |
|
|
pingtoo wrote: | May be you want to review you test
your ls show very different size 2.1k vs 2.2k.
And you diff compare same file.
|
Thanks!
Code: | root>diff /etc/portage/package.use/._cfg0000_steam /etc/portage/package.use/steam
17,18c17
< # move sys-devel/llvm llvm-core/llvm
< llvm-core/llvm abi_x86_32
---
> sys-devel/llvm abi_x86_32
38,39c37
< # move sys-devel/clang llvm-core/clang
< llvm-core/clang abi_x86_32
---
> sys-devel/clang abi_x86_32
|
I am still stuck on how to resolve this though. |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1037 Location: Somewhere in Denmark
|
Posted: Wed Dec 11, 2024 6:30 pm Post subject: |
|
|
Is it a matter of shell used? (what shell is used?)
I haven't seen command-prompts like that. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2526
|
Posted: Wed Dec 11, 2024 6:56 pm Post subject: |
|
|
mcnutty wrote: |
I am still stuck on how to resolve this though. |
Up until now I knew about etc-update but never heard of cfg-update. I use dispatch-conf however. Try it or etc-update.
p.s. check if there are more ._cfg files.
Best Regards,
Georgi |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 7:09 pm Post subject: |
|
|
freke wrote: | Is it a matter of shell used? (what shell is used?)
I haven't seen command-prompts like that. |
I use bash. The command prompt 'root>' is just a mockup. My actual prompt contains Unicode that the forums don't accept. |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 7:11 pm Post subject: |
|
|
logrusx wrote: | mcnutty wrote: |
I am still stuck on how to resolve this though. |
Up until now I knew about etc-update but never heard of cfg-update. I use dispatch-conf however. Try it or etc-update.
p.s. check if there are more ._cfg files.
Best Regards,
Georgi |
I've been using cfg-update without any (major) issues for at least 15 years. I don't like dispatch-conf or etc-update and don't really want to change. |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 7:26 pm Post subject: |
|
|
After some more investigation, my current best guess is kdiff3 is the problem. Running kdiff3 manually on the command line
Code: | root>kdiff3 /etc/portage/package.use/._cfg0000_steam /etc/portage/package.use/steam |
produces the same error as with cfg-update. However, using a different tool on the command line e.g., meld, works just fine. Strangely, running kdiff3 without arguments and then selecting the files from the GUI works just fine. Also running:
Code: | root>cfg-update -u -t meld |
works as expected. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2526
|
Posted: Wed Dec 11, 2024 8:31 pm Post subject: |
|
|
mcnutty wrote: | and don't really want to change. |
I'm sorry, I thought you had a different problem :)
mcnutty wrote: | After some more investigation, my current best guess is kdiff3 is the problem. Running kdiff3 manually on the command line
Code: | root>kdiff3 /etc/portage/package.use/._cfg0000_steam /etc/portage/package.use/steam |
produces the same error as with cfg-update. However, using a different tool on the command line e.g., meld, works just fine. Strangely, running kdiff3 without arguments and then selecting the files from the GUI works just fine. Also running:
Code: | root>cfg-update -u -t meld |
works as expected. |
That actually speaks for a change needed in cfg-update. A bug might be helpful.
EDIT: I just checked and kdiff3-1.11.5 from the binhost works fine with cfg-update. For the test I copied one of my package.use entries as a ._cfg file, made a single changes in it and kdiff3 showed the difference fine in a graphic window.
Best Regards,
Georgi |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1963
|
Posted: Wed Dec 11, 2024 9:11 pm Post subject: |
|
|
logrusx wrote: | That actually speaks for a change needed in cfg-update. A bug might be helpful. |
I'll disagree in that if the command-line does the same thing, then it's kdiff's fault. cfg-update can use other tools by default in its config file if necessary (or change options as needed). cfg-update is just calling the diff/merge tool so nothing to fix in itself. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2526
|
Posted: Wed Dec 11, 2024 9:25 pm Post subject: |
|
|
grknight wrote: | logrusx wrote: | That actually speaks for a change needed in cfg-update. A bug might be helpful. |
I'll disagree in that if the command-line does the same thing, then it's kdiff's fault. cfg-update can use other tools by default in its config file if necessary (or change options as needed). cfg-update is just calling the diff/merge tool so nothing to fix in itself. |
Maybe you didn't see the edit I made to my post above. I'm pretty sure when I made it, nobody had posted after me yet.
I wrongly assumed something had changed in kdiff3. Which might still hold true if OP's using the testing version.
Best Regards,
Georgi |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Wed Dec 11, 2024 9:31 pm Post subject: |
|
|
logrusx wrote: |
EDIT: I just checked and kdiff3-1.11.5 from the binhost works fine with cfg-update. For the test I copied one of my package.use entries as a ._cfg file, made a single changes in it and kdiff3 showed the difference fine in a graphic window.
|
Definitely, looks like it is probably a KDE/kdiff3 bug. It claims to be fixed in 1.11.2, but maybe not. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2526
|
Posted: Thu Dec 12, 2024 6:49 am Post subject: |
|
|
mcnutty wrote: |
Definitely, looks like it is probably a KDE/kdiff3 bug. It claims to be fixed in 1.11.2, but maybe not. |
That bug is related to Windows installer.
Version 1.11.5 works fine for me, what version do you have?
Best Regards,
Georgi |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Thu Dec 12, 2024 3:52 pm Post subject: |
|
|
[quote="logrusx"] mcnutty wrote: |
That bug is related to Windows installer.
Version 1.11.5 works fine for me, what version do you have?
Best Regards,
Georgi |
The initial bug report might have been about the Windows installer, but the comment I linked to was a user running Arch (kdiff3 1.11.1) and is showing the exact behavior I am seeing on version 1.11.5. Anyway I've filed a bug report on the KDE bug tracker.
Thanks for all the help and responses. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1963
|
Posted: Thu Dec 12, 2024 5:37 pm Post subject: |
|
|
mcnutty wrote: | The initial bug report might have been about the Windows installer, but the comment I linked to was a user running Arch (kdiff3 1.11.1) and is showing the exact behavior I am seeing on version 1.11.5. Anyway I've filed a bug report on the KDE bug tracker.
Thanks for all the help and responses. |
The bug report seems to indicate kdiff3 has a hard time with mixed line endings in a file.
Possibly check the non-printable characters and line endings to ensure both files are UNIX (\n and not \r\n) |
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Thu Dec 12, 2024 5:52 pm Post subject: |
|
|
grknight wrote: | The bug report seems to indicate kdiff3 has a hard time with mixed line endings in a file.
Possibly check the non-printable characters and line endings to ensure both files are UNIX (\n and not \r\n) |
All files have UNIX newlines. This will fail as described before:
Code: | $echo "a" > file1.txt; echo "b" > file2.txt; kdiff3 file1.txt file2.txt |
|
|
Back to top |
|
|
mcnutty Tux's lil' helper
Joined: 29 Dec 2009 Posts: 142
|
Posted: Fri Dec 20, 2024 8:54 pm Post subject: |
|
|
The bug appears to be fixed in 1.12.0. |
|
Back to top |
|
|
|