slot_collision_handler: Don't print an explanation for version based conflicts.
authorSebastian Luther <SebastianLuther@gmx.de>
Mon, 7 Jun 2010 17:54:37 +0000 (19:54 +0200)
committerZac Medico <zmedico@gentoo.org>
Thu, 12 Aug 2010 08:17:24 +0000 (01:17 -0700)
pym/_emerge/resolver/slot_collision.py

index 9c291f60aea12c2f648eaa15875c55de24a8c710..116b3368eae691a1de8c0073fc935401cfc8b99e 100644 (file)
@@ -53,6 +53,10 @@ class slot_conflict_handler(object):
                #If any conflict package was pulled in only by unspecific atoms, then
                #the user forgot to enable --newuse and/or --update.
                self.conflict_is_unspecific = False
+               
+               #Indicate if the conflict is caused by incompatible version requirements
+               #cat/pkg-2 pulled in, but a parent requires <cat/pkg-2
+               self.is_a_version_conflict = False
 
                self._prepare_conflict_msg_and_check_for_specificity()
 
@@ -261,7 +265,10 @@ class slot_conflict_handler(object):
                                                                        use.append(sub_type)
 
                                                        atom_str = highlight_violations(atom.unevaluated_atom, version_violated, use)
-                                                       
+
+                                                       if version_violated:
+                                                               self.is_a_version_conflict = True
+
                                                        msg.append("%s required by %s" % (atom_str, parent))
                                                msg.append("\n")
                                        
@@ -283,6 +290,9 @@ class slot_conflict_handler(object):
                msg.append("\n")
 
        def print_explanation(self):
+               if self.is_a_version_conflict:
+                       return False
+
                if self.conflict_is_unspecific and \
                        not ("--newuse" in self.myopts and "--update" in self.myopts):
                        writemsg("!!!Enabling --newuse and --update might solve this conflict.\n")