diff options
author | Brian Harring <ferringb@gmail.com> | 2021-09-21 16:51:32 -0700 |
---|---|---|
committer | Brian Harring <ferringb@gmail.com> | 2022-12-21 18:53:18 -0800 |
commit | 1ede34f996036605b6623dc0525df26826ac405d (patch) | |
tree | 7e174de3caa09e341d84b8f5543a43e8bd6e57f4 | |
parent | Update code for modern python standards (diff) | |
download | pkgcore-1ede34f996036605b6623dc0525df26826ac405d.tar.gz pkgcore-1ede34f996036605b6623dc0525df26826ac405d.tar.bz2 pkgcore-1ede34f996036605b6623dc0525df26826ac405d.zip |
ebd_ipc: filter unpack results when needed.
The previous form was risky in that it assigned a generator
to consume from; this form of pattern can bite folks in the
ass; minimally, it makes tests trickier.
Signed-off-by: Brian Harring <ferringb@gmail.com>
-rw-r--r-- | src/pkgcore/ebuild/ebd_ipc.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkgcore/ebuild/ebd_ipc.py b/src/pkgcore/ebuild/ebd_ipc.py index e7947837f..403bb352a 100644 --- a/src/pkgcore/ebuild/ebd_ipc.py +++ b/src/pkgcore/ebuild/ebd_ipc.py @@ -1039,7 +1039,6 @@ class Unpack(IpcCommand): def parse_args(self, *args, **kwargs): args = super().parse_args(*args, **kwargs) self.opts.distdir = self.op.env['DISTDIR'] - args.targets = self._filter_targets(args.targets) return args def _filter_targets(self, targets): @@ -1090,7 +1089,7 @@ class Unpack(IpcCommand): spawn_kwargs['uid'] = os_data.portage_uid spawn_kwargs['gid'] = os_data.portage_gid - for filename, ext, source in args.targets: + for filename, ext, source in self._filter_targets(args.targets): self.observer.write(f'>>> Unpacking {filename} to {self.cwd}', autoline=True) self.observer.flush() dest = pjoin(self.cwd, os.path.basename(filename[:-len(ext)])) |