provide more detail on errors (#162994)
authorKlaus Kaempf <kkaempf@suse.de>
Fri, 7 Apr 2006 16:35:38 +0000 (16:35 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Fri, 7 Apr 2006 16:35:38 +0000 (16:35 +0000)
zypp/solver/detail/ResolverInfoMisc.cc

index 59ed1dd..4e75907 100644 (file)
@@ -334,11 +334,12 @@ ResolverInfoMisc::message (void) const
            // other() = failed upgrade to affected()
            // other_capability() =
 
+           string other_str = ResolverInfo::toString(other());
            // Translator: 1.%s = name of package,patch,..., 2.%s = name of package,patch,...
            // TranslatorExample: Upgrade to foo to avoid removing bar is not possible
            // TranslatorExplanation: bar requires something from foo
            msg = str::form (_("Upgrade to %s to avoid removing %s is not possible."),
-                                   ResolverInfo::toString (other()).c_str(),
+                                   other_str.c_str(),
                                    affected_str.c_str());
        }
        break;
@@ -352,10 +353,12 @@ ResolverInfoMisc::message (void) const
            // other() = provider of capability
            // other_capability() = - empty -
 
+           string other_str = ResolverInfo::toString(other());
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = name of package,patch,...; 2.%s = dependency;
            msg = str::form (_("%s provides %s, but is scheduled to be uninstalled."),
-                            ResolverInfo::toString (other()).c_str(),
-                            ResolverInfo::toString (_capability).c_str());
+                            other_str.c_str(),
+                            cap_str.c_str());
        }
        break;
 
@@ -368,10 +371,12 @@ ResolverInfoMisc::message (void) const
            // other() = provider of capability
            // other_capability() = - empty -
 
+           string other_str = ResolverInfo::toString(other());
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = name of package,patch,...; 2.%s = dependency; 3.%s type (package, patch, ...)
            msg = str::form (_("%s provides %s, but another version of that %s is already installed."),
-                            other()->name().c_str(),
-                            ResolverInfo::toString (_capability).c_str(),
+                            other_str.c_str(),
+                            cap_str.c_str(),
                             translateResTraits(other()->kind()).c_str());
        }
        break;
@@ -385,10 +390,12 @@ ResolverInfoMisc::message (void) const
            // other() = provider of capability
            // other_capability() = - empty -
 
+           string other_str = ResolverInfo::toString(other());
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = name of package,patch,...; 2.%s = dependency;
            msg = str::form (_("%s provides %s, but it is uninstallable.  Try installing it on its own for more details."),
-                            other()->name().c_str(),
-                            ResolverInfo::toString (_capability).c_str());
+                            other_str.c_str(),
+                            cap_str.c_str());
        }
        break;
 
@@ -401,10 +408,12 @@ ResolverInfoMisc::message (void) const
            // other() = provider of capability
            // other_capability() = - empty -
 
+           string other_str = ResolverInfo::toString(other());
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = name of package,patch,...; 2.%s = dependency;
            msg = str::form (_("%s provides %s, but it is locked."),
-                            other()->name().c_str(),
-                            ResolverInfo::toString (_capability).c_str());
+                            other_str.c_str(),
+                            cap_str.c_str());
        }
        break;
 
@@ -417,10 +426,12 @@ ResolverInfoMisc::message (void) const
            // other() = provider of capability
            // other_capability() = - empty -
 
+           string other_str = ResolverInfo::toString(other());
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = name of package,patch,...; 2.%s = dependency;
            msg = str::form (_("%s provides %s, but has another architecture."),
-                            other()->name().c_str(),
-                            ResolverInfo::toString (_capability).c_str());
+                            other_str.c_str(),
+                            cap_str.c_str());
        }
        break;
        
@@ -434,9 +445,10 @@ ResolverInfoMisc::message (void) const
            // other() = - empty -
            // other_capability() = - empty -
 
+           string cap_str = ResolverInfo::toString (_capability);
            // Translator: 1.%s = dependency. 2.%s name of package, patch, ...
            msg = str::form (_("Can't satisfy requirement %s for %s"),
-                               ResolverInfo::toString (_capability).c_str(),
+                               cap_str.c_str(),
                                affected_str.c_str());
        }
        break;
@@ -457,7 +469,7 @@ ResolverInfoMisc::message (void) const
            // TranslatorExample: foo is required by other to-be-installed resolvable, so it won't be unlinked.
            // TranslatorExplanation: Cant uninstall foo since it is required by an to-be-installed resolvable
            msg = str::form (_("%s is required by other to-be-installed resolvable, so it won't be unlinked."),
-                            affected()->name().c_str());
+                            affected_str.c_str());
        }
        break;
 
@@ -474,7 +486,7 @@ ResolverInfoMisc::message (void) const
            // TranslatorExample: foo is required by other installed resolvable, so it won't be unlinked.
            // TranslatorExplanation: Cant uninstall foo since it is required by an installed resolvable
            msg = str::form (_("%s is required by other installed resolvable, so it won't be unlinked."),
-                            affected()->name().c_str());
+                            affected_str.c_str());
        }
        break;
 
@@ -491,7 +503,7 @@ ResolverInfoMisc::message (void) const
            // TranslatorExample: foo is locked and cannot be uninstalled.
            // TranslatorExplanation: foo is to-be-uninstalled but it is locked
            msg = str::form (_("%s is locked and cannot be uninstalled."),
-                            affected()->name().c_str());
+                            affected_str.c_str());
        }
        break;