fix for Bug 158446
authorStefan Schubert <schubi@suse.de>
Sat, 25 Mar 2006 12:50:20 +0000 (12:50 +0000)
committerStefan Schubert <schubi@suse.de>
Sat, 25 Mar 2006 12:50:20 +0000 (12:50 +0000)
zypp/solver/detail/ResolverContext.cc

index 9ad064f..6a225b1 100644 (file)
@@ -230,16 +230,11 @@ ResolverContext::install (PoolItem_Ref item, bool is_soft, int other_penalty)
        return true;
     }
 
-    // if it's exactly the same package, ignore this request silently.
-
     if (isParallelInstall( item )) {
-       return true;
-#if 0
        ResolverInfoMisc_Ptr misc_info = new ResolverInfoMisc( RESOLVER_INFO_TYPE_INSTALL_PARALLEL, item, RESOLVER_INFO_PRIORITY_VERBOSE );
        misc_info->setOtherPoolItem( getParallelInstall( item ) );
        addError( misc_info );
        return false;
-#endif
     }
 
     if (is_soft)
@@ -297,6 +292,13 @@ ResolverContext::upgrade (PoolItem_Ref item, PoolItem_Ref old_item, bool is_soft
     if (status.isToBeInstalled())
        return true;
 
+    if (isParallelInstall( item )) {
+       ResolverInfoMisc_Ptr misc_info = new ResolverInfoMisc( RESOLVER_INFO_TYPE_INSTALL_PARALLEL, item, RESOLVER_INFO_PRIORITY_VERBOSE );
+       misc_info->setOtherPoolItem( getParallelInstall( item ) );
+       addError( misc_info );
+       return false;
+    }
+
     ResStatus::TransactByValue by = ResStatus::SOLVER;
     if (item.status().isToBeInstalled()
        && item.status().getTransactByValue() > ResStatus::SOLVER) {
@@ -1510,7 +1512,8 @@ dup_name_check_cb (PoolItem_Ref item, const ResStatus & status, void *data)
        && info->other->kind() == item->kind()
        && info->other->name() == item->name()
        && item->edition().compare(info->other->edition()) == 0
-       && item->arch() == info->other->arch())
+       && item->arch() == info->other->arch()
+       && item->source() != info->other->source()) // if it's exactly the same package, ignore it silently.
     {
        info->flag = true;
        info->foundItem = item;