In order to handle all the packages ~arch masked in an overlay, I've split the package.keywords file into a folder and two files. Dispatch-conf failed to backup the merged files as, I assume, it was looking for a directory to copy into and found a file instead. Reproducible: Didn't try Steps to Reproduce: 1. Split files 2. backup of files in folder fails 3. (Not really sure what the portage.dispatch_conf.file_archive_post_process(archive) does) Actual Results: Traceback (most recent call last): File "/usr/sbin/dispatch-conf", line 422, in <module> d.grind (portage.settings ['CONFIG_PROTECT']) File "/usr/sbin/dispatch-conf", line 284, in grind self.post_process(conf['current']) File "/usr/sbin/dispatch-conf", line 317, in post_process portage.dispatch_conf.file_archive_post_process(archive) File "//usr/lib/portage/pym/portage/dispatch_conf.py", line 161, in file_archive_post_process os.rename(archive + '.dist.new', archive + '.dist') OSError: [Errno 20] Not a directory Expected Results: no error thrown. I don't know if creating the folder or just deleting the file is the better solution, or if it works. I'll know when it happens again, or not, the next time an update touches my package.keywords files. Either way, I guess the maintainers could look to see if that case is handled, where a user changes the file to a split set in a folder, will the backup start to fail?
*** Bug 309599 has been marked as a duplicate of this bug. ***
A 4-year bug? Add a sample for developer's convenience to reprocedure. Simply extract it to a clean /etc/portage should be fine.
Created attachment 356304 [details] Configuration for reprocedure
I think CC Wayne Davison <gentoo@blorf.net> is OK since he is in that file header.
*** Bug 342171 has been marked as a duplicate of this bug. ***
This could be handled in by making it rename the colliding package.keywords backup file to package.keywords.1, as it does when it is archiving a regular package.keywords file.
*** Bug 411009 has been marked as a duplicate of this bug. ***
*** Bug 455302 has been marked as a duplicate of this bug. ***
There's a patch in the following branch: https://github.com/zmedico/portage/tree/bug_256376 I've posted it for review here: https://archives.gentoo.org/gentoo-portage-dev/message/441d778c8efbfbfb14f91f08853ab28a
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=757beccdd058eb9ce9884a7c5e766e24c881ec8d
Released in portage-2.2.19