Summary: | sys-apps/portage-2.1.2_rc3-r3 - emerge --update --newuse --deep world fails with KeyError | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Anant Narayanan (RETIRED) <anant> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jakub, mobidyc |
Priority: | High | Keywords: | InVCS, REGRESSION |
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 147007 | ||
Attachments: |
only let depgraph.create() inject "merge" nodes into the final state dbapi
show how the packages got pulled into the dependency graph |
Description
Anant Narayanan (RETIRED)
2006-12-12 01:57:25 UTC
Whooops ;) Created attachment 103855 [details, diff]
only let depgraph.create() inject "merge" nodes into the final state dbapi
This patch should correct the problem. If the patch is saved as /tmp/create_merge.patch then it can be applied as follows:
cd /usr/lib/portage
patch -p0 < /tmp/patch
Please test the patch to verify that it corrects the problem for you. Thanks.
(In reply to comment #2) > Created an attachment (id=103855) [edit] > only let depgraph.create() inject "merge" nodes into the final state dbapi WFM Thanks for testing. It's fixed in svn r5279 and released in 2.1.2_rc3-r4. > This patch should correct the problem. If the patch is saved as
> /tmp/create_merge.patch then it can be applied as follows:
Works like a charm, thanks :)
I've realized that it's still possible for the same type of error to be triggered by rare cases of bug 1343 where a package is merged twice. I'll have to detect that case and eliminate the extra package in order for this to really be completely fixed. It's a pretty rare case, but it's certainly known to occur. I plan to solve this by constraining the package matching visibility of the portdbapi and bindbapi instances each time that a package is selected for merge. That way, any all following selections for a package in the same slot will be constrained to the same result. The portdbapi and bindbapi classes themselves don't necessarily need to be modified. All that's needed is something implementing the dbapi interface (something like a fakedbapi instance) and it will only be used for dep_check() calls made inside the depgraph class. I'm still seeing this error. My emerge already has the changes in this patch. lappy ~ # emerge -uDpv world These are the packages that would be merged, in order: Calculating world dependencies /Traceback (most recent call last): File "/usr/bin/emerge", line 4856, in ? retval = emerge_main() File "/usr/bin/emerge", line 4851, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/bin/emerge", line 4179, in action_build if not mydepgraph.xcreate(myaction): File "/usr/bin/emerge", line 1831, in xcreate if not self.validate_blockers(): File "/usr/bin/emerge", line 1542, in validate_blockers slot_atom = "%s:%s" % (portage.dep_getkey(mycpv), File "/usr/lib/portage/pym/portage.py", line 4461, in aux_get raise KeyError(mycpv) KeyError: 'sys-apps/dbus-1.0.2' lappy ~ # (In reply to comment #8) > I'm still seeing this error. My emerge already has the changes in this patch. You can work around this for now by downgrading to 2.1.2_rc3. I'm currently testing a patch that solves this I plan to release it in 2.1.2_rc3-r5 later today. As of svn r5287 the depgraph is fixed to handle all slot/node collisions. If a collision occurs that it isn't able to handle, then it will print an informational message something like this: !!! Multiple versions within a single package slot have been !!! pulled into the dependency graph: sys-apps/dbus-1.0.1-r2 sys-apps/dbus-1.0.2 It may be possible to solve this problem by using package.mask to prevent one of those packages from being selected. However, it is all so possible that conflicting dependencies exist such that they are impossible to satisfy simultaneously. If such a conflict exists in the dependencies of two different packages, then those packages can not be installed simultaneously. For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook. This has been released in 2.1.2_rc3-r5. *** Bug 158121 has been marked as a duplicate of this bug. *** Created attachment 104078 [details, diff]
show how the packages got pulled into the dependency graph
With this patch the user will be shown which packages pulled in the conflicting packages so that it will be easier for the user to decide what action to take. I was going to commit it now but our server seems to be down. Here is an example of the new output:
!!! Multiple versions within a single package slot have been
!!! pulled into the dependency graph:
('ebuild', '/', 'sys-apps/dbus-0.62-r2', 'merge') pulled in by
('ebuild', '/', 'app-text/ghostscript-gpl-8.54', 'merge')
('ebuild', '/', 'sys-apps/dbus-1.0.2', 'merge') pulled in by
('ebuild', '/', 'net-print/cups-1.2.7', 'merge')
|