Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782397 - app-portage/repoman-3.0.3-r1 fails tests
Summary: app-portage/repoman-3.0.3-r1 fails tests
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 783957
Blocks:
  Show dependency tree
 
Reported: 2021-04-12 06:42 UTC by Agostino Sarubbo
Modified: 2022-07-12 03:18 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,127.95 KB, text/plain)
2021-04-12 06:42 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-04-12 06:42:13 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-portage/repoman-3.0.3-r1 fails tests.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2021-04-12 06:42:16 UTC
Created attachment 699336 [details]
build.log

build log and emerge --info
Comment 2 Zac Medico gentoo-dev 2021-04-12 08:41:13 UTC
(In reply to Agostino Sarubbo from comment #1)
> Created attachment 699336 [details]
> build.log
> 
> Traceback (most recent call last):
>   File "/usr/lib/pypy3.7/site-packages/portage/util/_async/AsyncFunction.py", line 39, in _run
>     result = self.target(*(self.args or []), **(self.kwargs or {}))
>   File "/var/tmp/portage/app-portage/repoman-3.0.3-r1/work/repoman-3.0.3-pypy3/lib/repoman/tests/simple/test_simple.py", line 68, in _subprocess
>     repoman_vars = _repoman_init(["repoman"] + args)
>   File "/var/tmp/portage/app-portage/repoman-3.0.3-r1/work/repoman-3.0.3-pypy3/lib/repoman/main.py", line 98, in _repoman_init
>     repo_settings, vcs_settings, scanner, qadata = _create_scanner(options, can_force, config_root, repoman_settings)
>   File "/var/tmp/portage/app-portage/repoman-3.0.3-r1/work/repoman-3.0.3-pypy3/lib/repoman/main.py", line 118, in _create_scanner
>     repoman_settings, vcs_settings, options, qadata)
>   File "/var/tmp/portage/app-portage/repoman-3.0.3-r1/work/repoman-3.0.3-pypy3/lib/repoman/repos.py", line 114, in __init__
>     self.repoman_settings["PORTAGE_GPG_KEY"])
>   File "/usr/lib/pypy3.7/site-packages/portage/package/ebuild/config.py", line 2633, in __getitem__
>     return self._getitem(key)
>   File "/usr/lib/pypy3.7/site-packages/portage/package/ebuild/config.py", line 2694, in _getitem
>     raise KeyError(mykey)
> KeyError: 'PORTAGE_GPG_KEY'


It looks like FEATURES="sign" somehow leaked into the test environment.
Comment 3 Zac Medico gentoo-dev 2021-04-19 00:53:36 UTC
Running tests in a venv under wsl on Ubuntu, I've found that I need to make these variables lazy:

> lib/portage/tests/__init__.py:  cnf_path = os.path.join(PORTAGE_BASE_PATH, 'cnf')
> lib/portage/tests/__init__.py:  cnf_etc_path = cnf_path
> lib/portage/tests/__init__.py:  cnf_bindir = PORTAGE_BIN_PATH
> lib/portage/tests/__init__.py:  cnf_sbindir = cnf_bindir
> lib/portage/tests/__init__.py:  cnf_path = os.path.join(EPREFIX or '/', GLOBAL_CONFIG_PATH)
> lib/portage/tests/__init__.py:  cnf_etc_path = os.path.join(EPREFIX or '/', 'etc')
> lib/portage/tests/__init__.py:  cnf_eprefix = EPREFIX
> lib/portage/tests/__init__.py:  cnf_bindir = os.path.join(EPREFIX or '/', 'usr', 'bin')
> lib/portage/tests/__init__.py:  cnf_sbindir = os.path.join(EPREFIX or '/', 'usr', 'sbin')
> lib/portage/tests/__init__.py:          self.cnf_path = cnf_path
> lib/portage/tests/__init__.py:          self.cnf_etc_path = cnf_etc_path
> lib/portage/tests/resolver/ResolverPlayground.py:       cnf_path_repoman = None
> repoman/lib/repoman/tests/__init__.py:  cnf_path = os.path.join(REPOMAN_BASE_PATH, 'cnf')
> repoman/lib/repoman/tests/__init__.py:  cnf_path_repoman = cnf_path
> repoman/lib/repoman/tests/__init__.py:  cnf_etc_path = cnf_path
> repoman/lib/repoman/tests/__init__.py:  cnf_bindir = os.path.join(REPOMAN_BASE_PATH, 'bin')
> repoman/lib/repoman/tests/__init__.py:  cnf_sbindir = cnf_bindir
> repoman/lib/repoman/tests/__init__.py:  cnf_path = os.path.join(EPREFIX or '/', GLOBAL_CONFIG_PATH)
> repoman/lib/repoman/tests/__init__.py:  cnf_path_repoman = os.path.join(EPREFIX or '/',
> repoman/lib/repoman/tests/__init__.py:  cnf_etc_path = os.path.join(EPREFIX or '/', 'etc')
> repoman/lib/repoman/tests/__init__.py:  cnf_eprefix = EPREFIX
> repoman/lib/repoman/tests/__init__.py:  cnf_bindir = os.path.join(EPREFIX or '/', 'usr', 'bin')
> repoman/lib/repoman/tests/__init__.py:  cnf_sbindir = os.path.join(EPREFIX or '/', 'usr', 'sbin')
> repoman/lib/repoman/tests/__init__.py:          self.cnf_path = cnf_path
> repoman/lib/repoman/tests/__init__.py:          self.cnf_etc_path = cnf_etc_path
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:31 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.