Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837656 - sys-apps/portage dispatch-conf TypeError: diffstatusoutput() takes 2 positional arguments but 3 were given
Summary: sys-apps/portage dispatch-conf TypeError: diffstatusoutput() takes 2 position...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-10 14:22 UTC by Mike Gilbert
Modified: 2022-04-11 20:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2022-04-10 14:22:13 UTC
Since 94dad3d64599f7e2c0c28e90ec4bee883746e385, I get the error below when running dispatch-conf.

% sudo /usr/sbin/dispatch-conf
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/dispatch-conf", line 587, in <module>
    d.grind(portage.util.shlex_split(portage.settings.get("CONFIG_PROTECT", "")))
  File "/usr/lib/python-exec/python3.10/dispatch-conf", line 309, in grind
    confs = [x for x in confs if f(x)]
  File "/usr/lib/python-exec/python3.10/dispatch-conf", line 309, in <listcomp>
    confs = [x for x in confs if f(x)]
  File "/usr/lib/python-exec/python3.10/dispatch-conf", line 224, in f
    unmodified = len(diff(conf["current"], archive + ".dist")[1]) == 0
  File "/usr/lib/python3.10/site-packages/portage/dispatch_conf.py", line 106, in __call__
    return diff_mixed(
  File "/usr/lib/python3.10/site-packages/portage/dispatch_conf.py", line 93, in diff_mixed
    return func(diff_files[0], diff_files[1])
TypeError: diffstatusoutput() takes 2 positional arguments but 3 were given
Comment 1 Larry the Git Cow gentoo-dev 2022-04-11 12:11:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=3d63920030ec24996d6678ca0d7bce24abab6383

commit 3d63920030ec24996d6678ca0d7bce24abab6383
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-04-10 14:36:26 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-04-11 12:11:19 +0000

    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@gentoo.org>

 lib/portage/dispatch_conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=51df6a3a490c46bcb40939be0691f59e2edbbd7b

commit 51df6a3a490c46bcb40939be0691f59e2edbbd7b
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-04-10 14:29:09 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-04-11 12:11:05 +0000

    Revert "dispatch_conf: fix arguments"
    
    This is a step in the wrong direction, and causes another failure.
    
    Reverts: 94dad3d64599f7e2c0c28e90ec4bee883746e385.
    Bug: https://bugs.gentoo.org/836447
    Bug: https://bugs.gentoo.org/837656
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

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