Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217664 - 'emerge -a filename.ebuild' fails for masked packages
Summary: 'emerge -a filename.ebuild' fails for masked packages
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
Depends on:
Blocks: 216231
  Show dependency tree
Reported: 2008-04-14 15:18 UTC by Jan Schubert
Modified: 2008-04-16 01:51 UTC (History)
1 user (show)

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

fix the KeyError (pkg_cache.patch,758 bytes, patch)
2008-04-14 23:55 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schubert 2008-04-14 15:18:03 UTC
There might a problem with some options to emerge when trying to emerge masked packages. The following is an example which worked fine when without specifying any option:

# emerge -a rpm-5.0.3.ebuild

*** emerging by path is broken and may not always work!!!

These are the packages that would be merged, in order:

Calculating dependencies -
*** You are emerging a masked package. It is MUCH better to use
*** /etc/portage/package.* to accomplish this. See portage(5) man
*** page for details.
>>> Waiting 10 seconds before starting...
>>> (Control-C to abort)...
Continuing... in: 10 9 8 7 6 5 4 3 2 1
... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 7852, in <module>
    retval = emerge_main()
  File "/usr/bin/emerge", line 7846, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 7121, in action_build
  File "/usr/bin/emerge", line 3833, in display
    pkg = self._pkg_cache[tuple(x)]
KeyError: ('ebuild', '/', 'app-arch/rpm-5.0.3', 'merge')
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2008-04-14 18:38:06 UTC
Jan, you do realize that you are expected to pass an option that specifies a *package* name, not the .ebuild file, right?
Comment 2 Zac Medico gentoo-dev 2008-04-14 21:29:08 UTC
I don't see any reason why normal masking rules should not apply simply because a package path is given rather than a normal atom. So, I think the proper solution is to fix the masking behavior so that it's consistent with normal atoms.
Comment 3 Zac Medico gentoo-dev 2008-04-14 23:55:56 UTC
Created attachment 149758 [details, diff]
fix the KeyError
Comment 4 Zac Medico gentoo-dev 2008-04-16 01:51:03 UTC
This is fixed in 2.1.5_rc4.