From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1381003-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 80F4015808B
	for <garchives@archives.gentoo.org>; Wed, 30 Mar 2022 23:11:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2284DE0824;
	Wed, 30 Mar 2022 23:11:56 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 1E222E0824
	for <gentoo-commits@lists.gentoo.org>; Wed, 30 Mar 2022 23:11:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7DC0A341129
	for <gentoo-commits@lists.gentoo.org>; Wed, 30 Mar 2022 23:11:53 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id DAB6A177
	for <gentoo-commits@lists.gentoo.org>; Wed, 30 Mar 2022 23:11:51 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1648681903.94dad3d64599f7e2c0c28e90ec4bee883746e385.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/
X-VCS-Repository: proj/portage
X-VCS-Files: lib/portage/dispatch_conf.py
X-VCS-Directories: lib/portage/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 94dad3d64599f7e2c0c28e90ec4bee883746e385
X-VCS-Branch: master
Date: Wed, 30 Mar 2022 23:11:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: f649dffd-ab6c-4500-aeda-18a82aac1c90
X-Archives-Hash: b5d00c3b51f9f3eceef0f236715e950f

commit:     94dad3d64599f7e2c0c28e90ec4bee883746e385
Author:     Kenneth Raplee <kenrap <AT> kennethraplee <DOT> com>
AuthorDate: Wed Mar 30 22:47:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 30 23:11:43 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=94dad3d6

dispatch_conf: fix arguments

Closes: https://bugs.gentoo.org/836447
Signed-off-by: Kenneth Raplee <kenrap <AT> kennethraplee.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/dispatch_conf.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/portage/dispatch_conf.py b/lib/portage/dispatch_conf.py
index 6dbb1885e..fc130c9af 100644
--- a/lib/portage/dispatch_conf.py
+++ b/lib/portage/dispatch_conf.py
@@ -28,14 +28,15 @@ RCS_GET = "co"
 _ARCHIVE_ROTATE_MAX = 9
 
 
-def diffstatusoutput(cmd, file1, file2):
+def diffstatusoutput(file1, file2):
     """
     Execute the string cmd in a shell with getstatusoutput() and return a
     2-tuple (status, output).
     """
     # Use Popen to emulate getstatusoutput(), since getstatusoutput() may
     # raise a UnicodeDecodeError which makes the output inaccessible.
-    args = shlex_split(cmd % (file1, file2))
+    cmd = f"diff -aq '{file1}' '{file2}'"
+    args = shlex_split(cmd)
 
     args = (portage._unicode_encode(x, errors="strict") for x in args)
     proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
@@ -340,7 +341,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(curconf, archive)[1]) != 0
     ):
         _file_archive_rotate(archive)