From f419e6e863af2c87773b829fb5e8ef09797a620a Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Wed, 5 Oct 2016 23:08:29 -0400 Subject: [PATCH] Fix for portage-2.3.0 New versions of portage have a "sourcefile" setting, and the _native_kwargs function (copy+pasted from actual portage sync module, which apparently was never needed) is gone. --- portage/sync/modules/squashmirror/__init__.py | 3 ++- portage/sync/modules/squashmirror/squashmirror.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/portage/sync/modules/squashmirror/__init__.py b/portage/sync/modules/squashmirror/__init__.py index d02acdc..6421848 100644 --- a/portage/sync/modules/squashmirror/__init__.py +++ b/portage/sync/modules/squashmirror/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2015 Nick Bowler +# Copyright © 2015-2016 Nick Bowler # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ module_spec = { 'provides': { 'squashmirror-module': { 'name': 'squashmirror', + 'sourcefile': 'squashmirror', 'description': __doc__, 'class': 'SquashMirror', 'validate_config': CheckSquashConfig, diff --git a/portage/sync/modules/squashmirror/squashmirror.py b/portage/sync/modules/squashmirror/squashmirror.py index d4a5d3d..115bfef 100644 --- a/portage/sync/modules/squashmirror/squashmirror.py +++ b/portage/sync/modules/squashmirror/squashmirror.py @@ -1,4 +1,4 @@ -# Copyright © 2015 Nick Bowler +# Copyright © 2015-2016 Nick Bowler # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -72,7 +72,7 @@ class SquashMirror(NewBase): args.extend(['-comp', opts['squash-compression']]) args.extend(opts['squash-extra-opts'].split()) - rc = spawn(args, **portage._native_kwargs(self.spawn_kwargs)) + rc = spawn(args, **self.spawn_kwargs) if rc != os.EX_OK: self.err("command failed: %s" % " ".join(args)) return (rc, False) -- 2.43.0