Bug #217664 - Fix emerge 'by path' package argument handling so that
authorZac Medico <zmedico@gentoo.org>
Mon, 14 Apr 2008 23:52:12 +0000 (23:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Apr 2008 23:52:12 +0000 (23:52 -0000)
Package instances are properly cached (avoiding a KeyError later).

svn path=/main/trunk/; revision=9898

pym/_emerge/__init__.py

index dad9b080ab2f9ed5aeeef1c013df034480da2833..e0382570fa234fa076012fbcae57d87186cfeb29 100644 (file)
@@ -2198,6 +2198,7 @@ class depgraph(object):
                                pkg = Package(type_name="binary", root=myroot,
                                        cpv=mykey, built=True, metadata=metadata,
                                        onlydeps=onlydeps)
+                               self._pkg_cache[pkg] = pkg
                                args.append(PackageArg(arg=x, package=pkg,
                                        root_config=root_config))
                        elif ext==".ebuild":
@@ -2236,6 +2237,7 @@ class depgraph(object):
                                metadata["USE"] = pkgsettings["PORTAGE_USE"]
                                pkg = Package(type_name="ebuild", root=myroot,
                                        cpv=mykey, metadata=metadata, onlydeps=onlydeps)
+                               self._pkg_cache[pkg] = pkg
                                args.append(PackageArg(arg=x, package=pkg,
                                        root_config=root_config))
                        elif x.startswith(os.path.sep):