commit: f55ab6a98e4042f570a8a56b13926fef66cbf22b Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Thu Jun 12 15:45:30 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Thu Jun 12 15:45:56 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f55ab6a9
portage/dispatch_conf.py: Fix bug 512690 This bug happened when a /etc/portage/package.* file was changed into a directory. File "/usr/lib64/portage/pym/portage/dispatch_conf.py", line 210, in file_archive_post_process os.rename(archive + '.dist.new', archive + '.dist') NotADirectoryError: [Errno 20] Not a directory: '/etc/config-archive/etc/portage/package.unmask/unmask.dist' --- pym/portage/dispatch_conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py index f975ccd..113d965 100644 --- a/pym/portage/dispatch_conf.py +++ b/pym/portage/dispatch_conf.py @@ -207,4 +207,5 @@ def rcs_archive_post_process(archive): def file_archive_post_process(archive): """Rename the archive file with the .dist.new suffix to a .dist suffix""" - os.rename(archive + '.dist.new', archive + '.dist') + if os.path.exists(archive + '.dist.new'): + os.rename(archive + '.dist.new', archive + '.dist')