-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Attempting to run pquery --pkgset <set>
or pquery --installed --pkgset <set>
on any set except installed
, system
, world
, or a custom defined set (under /etc/portage/sets/*) will fail with a traceback.
This may be related to #280?
For example, pquery --pkgset selected
produces the following on my machine:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pkgcore/util/commandline.py", line 172, in _load_obj
val = sections[name]
~~~~~~~~^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 46, in __getitem__
raise KeyError(key)
KeyError: 'selected'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 206, in _instantiate
self._instance = callable_obj(*pargs, **configdict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: tree.__init__() got an unexpected keyword argument 'repos'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 132, in instantiate
self._instance = self._instantiate()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 211, in _instantiate
raise errors.InstantiationError(
pkgcore.config.errors.InstantiationError: Failed instantiating section 'repo-stack': exception caught from 'pkgcore.repository.multiplex.tree'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 166, in _instantiate
final_val.append(ref.instantiate())
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 136, in instantiate
raise errors.InstantiationError(self.name) from e
pkgcore.config.errors.InstantiationError: Failed instantiating section 'repo-stack'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 132, in instantiate
self._instance = self._instantiate()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 170, in _instantiate
raise errors.ConfigurationError(
pkgcore.config.errors.ConfigurationError: Instantiating reference 'ebuild_repo' pointing at 'repo-stack'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.11/pquery", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/scripts/__init__.py", line 43, in main
run(os.path.basename(sys.argv[0]))
File "/usr/lib/python3.11/site-packages/pkgcore/scripts/__init__.py", line 35, in run
sys.exit(tool())
^^^^^^
File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 81, in __call__
ret = self.main()
^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 191, in main
self.handle_exec_exception(e)
File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 173, in main
self.options, func = self.parse_args(
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 128, in parse_args
self.handle_exec_exception(e)
File "/usr/lib/python3.11/site-packages/snakeoil/cli/tool.py", line 102, in parse_args
options = self.parser.parse_args(args=args, namespace=namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/snakeoil/cli/arghparse.py", line 1305, in parse_args
delayed(args, attr)
File "/usr/lib/python3.11/site-packages/snakeoil/cli/arghparse.py", line 397, in __call__
self.invokable()
File "/usr/lib/python3.11/site-packages/pkgcore/util/commandline.py", line 217, in _real_call
value = [self._load_obj(sections, x) for x in values]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/util/commandline.py", line 217, in <listcomp>
value = [self._load_obj(sections, x) for x in values]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/util/commandline.py", line 174, in _load_obj
choices = ", ".join(self._choices(sections))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/util/commandline.py", line 164, in _choices
for k, v in sections.items():
File "/usr/lib/python3.11/site-packages/snakeoil/mappings.py", line 71, in items
yield k, self[k]
~~~~^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 47, in __getitem__
return conf.instantiate()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pkgcore/config/central.py", line 136, in instantiate
raise errors.InstantiationError(self.name) from e
pkgcore.config.errors.InstantiationError: Failed instantiating section 'vuln'
For more detail, tracebacks are output whenever the following sets are passed:
selected
selected-packages
selected-sets
profile
changed-deps
deprecated-live-rebuild
downgrade
installed
live-rebuild
module-rebuild
preserved-rebuild
rebuilt-binaries
security
unavailable
unavailable-binaries
x11-module-rebuild
It also spews the same traceback when any non-real set is passed such as:
pquery --pkgset no_such_set_exists
Metadata
Metadata
Assignees
Labels
No labels