for collision-protect also check that only versions with the same slot can overwrite...
authorMarius Mauch <genone@gentoo.org>
Sun, 26 Mar 2006 05:54:19 +0000 (05:54 -0000)
committerMarius Mauch <genone@gentoo.org>
Sun, 26 Mar 2006 05:54:19 +0000 (05:54 -0000)
svn path=/main/trunk/; revision=3012

pym/portage.py

index 6d7952a5b1dceb750e17567c217cbdec8b4312d3..9cc32c7c91abe681533e6526de6c04f6ba2e7706 100644 (file)
@@ -5869,9 +5869,11 @@ class dblink:
                        if self.pkg in otherversions:
                                otherversions.remove(self.pkg)  # we already checked this package
 
+                       myslot = self.settings["SLOT"]
                        for v in otherversions:
-                               # should we check for same SLOT here ?
-                               mypkglist.append(dblink(self.cat,v,destroot,self.settings))
+                               # only allow versions with same slot to overwrite files
+                               if myslot == db[self.myroot]["vartree"].dbapi.aux_get(self.mycpv, ["SLOT"])[0]:
+                                       mypkglist.append(dblink(self.cat,v,destroot,self.settings))
 
                        print green("*")+" checking "+str(len(myfilelist))+" files for package collisions"
                        for f in myfilelist: