Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 634576

Summary: sys-apps/portage: emerge could fail faster when given arguments for packages that don't exist
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED OBSOLETE    
Severity: normal CC: berinaniesh, esigra, fturco, sam, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723, 835380    

Description Zac Medico gentoo-dev 2017-10-17 20:40:24 UTC
Currently, emerge can get very far into the dependency calculation before realizing that it has been given one or more arguments for packages that don't exist. It would be better to fail faster.
Comment 1 Zac Medico gentoo-dev 2017-10-17 20:52:51 UTC
We want to detect the packages that don't exist in the depgraph._select_files method, around here:

> 	if "/" in x.split(":")[0]:
> 		args.append(AtomArg(arg=x, atom=Atom(x, allow_repo=True),
> 			root_config=root_config))
> 		continue
> 	expanded_atoms = self._dep_expand(root_config, x)
Comment 2 Berin Aniesh 2023-05-20 09:54:46 UTC
This bug seems to have been fixed at some point in 2021. Sam James and myself tried to track down the commit, but the results are inconsistent because of different EAPI and python versions. But rest assured, this bug has been fixed. Can be tested with the command `emerge www-client/chromium "<cython-3" libreoffice dev-lang/ghc dev-haskell/doctest dev-ruby/actionpack firefox tensorflow idonotexist`. Here, portage finds "idontexist" is not a valid package before dependency calculation of any package is done.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-20 10:08:22 UTC
I can't for the life of me see where this got fixed but I can't seem to reproduce this right now.

I feel a bit annoyed that I can't spot which commit did it, but I also absolutely can't hit it anymore.

I wonder if it's just because of all the caching we've added?