do not compare channels if the solutions has the same
authorStefan Schubert <schubi@suse.de>
Fri, 3 Mar 2006 07:55:19 +0000 (07:55 +0000)
committerStefan Schubert <schubi@suse.de>
Fri, 3 Mar 2006 07:55:19 +0000 (07:55 +0000)
zypp/solver/detail/ResolverContext.cc

index 58c2e9c32ced7e3aa302985d8c33b494e715269c..056c7abadb826a9d4268767d8cc9f03bb2bc11cc 100644 (file)
@@ -1597,19 +1597,23 @@ ResolverContext::collectCompareInfo (int & cmpVersion,    // Version compare of
     cmpSource = 0;
     int cmpCompare = 0;
 
-    if (!differentUserSources) {
-       // user selected items which has to be installed has only one channel;
-       // cmpSource = number of items of that channel
-       cmpSource = thisMap[userSource];
-    }
+    if (userSource != userSourceCompare) {
+        // diffent Channel. If they are the same we will ragard the size, download time...
+       if (!differentUserSources)
+       {
+           // user selected items which has to be installed has only one channel;
+           // cmpSource = number of items of that channel
+           cmpSource = thisMap[userSource];
+       }
        
-    if (!differentUserCompareSources) {
-       // user selected items which has to be installed has only one channel;  
-       // cmpCompare = number of items of that channel
-       cmpCompare = compareMap[userSourceCompare];
-    }
+       if (!differentUserCompareSources) {
+           // user selected items which has to be installed has only one channel;      
+           // cmpCompare = number of items of that channel
+           cmpCompare = compareMap[userSourceCompare];
+       }
 
-    cmpSource = cmpSource - cmpCompare;
+       cmpSource = cmpSource - cmpCompare;
+    }
 
     if (cmpSource == 0)
     {