From: Zac Medico Date: Mon, 19 Mar 2012 18:33:28 +0000 (-0700) Subject: doebuild_environment: comment on bug #408817 X-Git-Tag: v2.2.0_alpha93 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=4b183c1d9f7431e984dfe3f1ab93e3df15e9f31b;p=portage.git doebuild_environment: comment on bug #408817 --- diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 56de55441..ffad4563f 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -183,6 +183,14 @@ def doebuild_environment(myebuild, mydo, myroot=None, settings=None, if mysettings.mycpv is not None and \ mysettings.configdict["pkg"].get("PF") == mypv and \ "CATEGORY" in mysettings.configdict["pkg"]: + # Assume that PF is enough to assume that we've got + # the correct CATEGORY, though this is not really + # a solid assumption since it's possible (though + # unlikely) that two packages in different + # categories have the same PF. Callers should call + # setcpv or create a clean clone of a locked config + # instance in order to ensure that this assumption + # does not fail like in bug #408817. cat = mysettings.configdict["pkg"]["CATEGORY"] mycpv = mysettings.mycpv elif os.path.basename(pkg_dir) in (mysplit[0], mypv):