commit: 3d63920030ec24996d6678ca0d7bce24abab6383 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Sun Apr 10 14:36:26 2022 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Mon Apr 11 12:11:19 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3d639200
dispatch-conf: fix diffstatusoutput_mixed() usage This function should accept a command placeholder and two arguments. The command placeholder is used in 2 places: 1. User config: dispatch-conf.conf 2. Inline in portage.dispatch_conf.file_archive() We need to maintain the command placeholder format becaused of usage 1. Fixes: 7c8875c38b187fbd2e0fa5fc39bbb38c1588d0fb Bug: https://bugs.gentoo.org/836447 Bug: https://bugs.gentoo.org/837656 Closes: https://github.com/gentoo/portage/pull/805 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> lib/portage/dispatch_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/dispatch_conf.py b/lib/portage/dispatch_conf.py index 6dbb1885e..ec2bc84d3 100644 --- a/lib/portage/dispatch_conf.py +++ b/lib/portage/dispatch_conf.py @@ -340,7 +340,7 @@ def file_archive(archive, curconf, newconf, mrgconf): # Archive the current config file if it isn't already saved if ( os.path.lexists(archive) - and len(diffstatusoutput_mixed(f"diff -aq '{curconf}' '{archive}'")[1]) != 0 + and len(diffstatusoutput_mixed("diff -aq '%s' '%s'", curconf, archive)[1]) != 0 ): _file_archive_rotate(archive)