summaryrefslogtreecommitdiff
path: root/src/reason_fragment.cc
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-03-02 12:31:45 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-03-02 20:24:14 +0800
commitdbf029ed483f5602efcdf29536c395268a782f1d (patch)
tree4e65d3d3d0fbabeffc3a3b6fbf0313c2f6cb0247 /src/reason_fragment.cc
parentde5f5794ccd6a7fa580ff0bfd8f10c3c71ff2e33 (diff)
downloadaptitude-dbf029ed483f5602efcdf29536c395268a782f1d.tar.gz
Use arch-qualified names when explaining package states, actions
Diffstat (limited to 'src/reason_fragment.cc')
-rw-r--r--src/reason_fragment.cc66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/reason_fragment.cc b/src/reason_fragment.cc
index 03a257c7..e8be0654 100644
--- a/src/reason_fragment.cc
+++ b/src/reason_fragment.cc
@@ -125,14 +125,14 @@ cw::fragment *prvfrag(pkgCache::DepIterator dep,
if((currver.end() || provided_cand) &&
(currver.end() || provided_curr) &&
(provided_cand || provided_curr))
- fragments.push_back(cw::text_fragment(P->Name(),
+ fragments.push_back(cw::text_fragment(P->FullName(true),
pkg_item::pkg_style(*P, false)));
else if(provided_cand || provided_curr)
{
pkgCache::VerIterator &pv=provided_cand?candver:currver;
fragments.push_back(cw::style_fragment(cw::fragf("%s %s",
- P->Name(),
+ P->FullName(true).c_str(),
pv.VerStr()),
pkg_ver_item::ver_style(pv, false)));
}
@@ -143,7 +143,7 @@ cw::fragment *prvfrag(pkgCache::DepIterator dep,
i!=providing_versions.end(); ++i)
if(i->ParentPkg()==*P)
fragments.push_back(cw::style_fragment(cw::fragf("%s %s",
- P->Name(),
+ P->FullName(true).c_str(),
i->VerStr()),
pkg_ver_item::ver_style(*i, false)));
}
@@ -263,7 +263,7 @@ cw::fragment *dep_or_frag(pkgCache::PkgIterator pkg,
sec=string(sec, 0, sec.find('/'));
return cw::fragf(_("%F%s %F %F"),
- cw::text_fragment(dep.ParentPkg().Name(),
+ cw::text_fragment(dep.ParentPkg().FullName(true),
pkg_item::pkg_style(dep.ParentPkg(), false)),
sec.empty() || sec=="main"?"":(" ["+sec+']').c_str(),
depname_frag(dep),
@@ -346,24 +346,24 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
{
case pkg_unused_remove:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b was installed automatically; it is being removed because all of the packages which depend upon it are being removed:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_auto_remove:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be automatically removed because of dependency errors:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_auto_install:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be automatically installed to satisfy the following dependencies:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_auto_hold:
{
if(candver.end() || candver==pkg.CurrentVer())
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b cannot be upgraded now, but if it could be, it would still be held at version %B%s%b."),
- pkg.Name(), pkg.CurrentVer().VerStr())));
+ pkg.FullName(true).c_str(), pkg.CurrentVer().VerStr())));
else
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will not be upgraded to version %B%s%b, to avoid breaking the following dependencies:"),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
candver.VerStr())));
break;
}
@@ -372,16 +372,16 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
{
if((*apt_cache_file)->is_held(pkg))
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b cannot be upgraded now, but if it could be, it would still be held at version %B%s%b."),
- pkg.Name(), pkg.CurrentVer().VerStr())));
+ pkg.FullName(true).c_str(), pkg.CurrentVer().VerStr())));
else
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b is currently installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
}
else
{
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b is not currently installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
}
@@ -389,53 +389,53 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
breakage=true;
fragments.push_back(wrapbox(cw::fragf(_("Some dependencies of %B%s%b are not satisfied:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_downgrade:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be downgraded."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_hold:
{
if(estate.selection_state != pkgCache::State::Hold &&
!candver.end() && candver.VerStr() == estate.forbidver)
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will not be upgraded to the forbidden version %B%s%b."),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
candver.VerStr())));
else
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b could be upgraded to version %B%s%b, but it is being held at version %B%s%b."),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
candver.VerStr(),
pkg.CurrentVer().VerStr())));
}
break;
case pkg_reinstall:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be re-installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_install:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_remove:
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be removed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
break;
case pkg_upgrade:
{
fragments.push_back(wrapbox(cw::fragf(_("%B%s%b will be upgraded from version %B%s%b to version %B%s%b."),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
pkg.CurrentVer().VerStr(),
candver.VerStr(), A_BOLD)));
}
break;
case pkg_unconfigured:
- fragments.push_back(wrapbox(cw::fragf(_("%B%s%b is only partly installed; its installation will be completed."), pkg.Name())));
+ fragments.push_back(wrapbox(cw::fragf(_("%B%s%b is only partly installed; its installation will be completed."), pkg.FullName(true).c_str())));
break;
default:
// Another non-translatable internal error.
fragments.push_back(wrapbox(cw::fragf("Internal error: Unknown package state for %s!",
- pkg.Name())));
+ pkg.FullName(true).c_str())));
}
@@ -463,17 +463,17 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
{
if(state.Delete())
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on %B%s%b and will be broken by its removal:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
else
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on %B%s%b and are broken:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
}
// It will end up installed.
else
{
if(pkg.CurrentVer().end())
fragments.push_back(wrapbox(cw::fragf(_("The following packages conflict with %B%s%b and will be broken by its installation:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
else
// up/downgrade; could be either Depends or Conflicts/Breaks
{
@@ -506,24 +506,24 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
{
if(state.Keep())
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on a version of %B%s%b other than the currently installed version of %B%s%b, or conflict with the currently installed version:"),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
pkg.CurrentVer().VerStr())));
else
fragments.push_back(wrapbox(cw::fragf(_("The following packages conflict with %B%s%b, or depend on a version of it which is not going to be installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
}
else if(has_conflicts)
fragments.push_back(wrapbox(cw::fragf(_("The following packages conflict with %B%s%b:"),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
else if(has_depends)
{
if(state.Keep())
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on a version of %B%s%b other than the currently installed version of %B%s%b:"),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
pkg.CurrentVer().VerStr())));
else
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on a version of %B%s%b which is not going to be installed."),
- pkg.Name())));
+ pkg.FullName(true).c_str())));
}
}
else
@@ -535,7 +535,7 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
// factoring out upgraded/downgraded in its two senses
// would be a royal pain even if gettext supported it.
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on the currently installed version of %B%s%b (%B%s%b), or conflict with the version it will be %s to (%B%s%b), and will be broken if it is %s."),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
pkg.CurrentVer().VerStr(),
actionname,
instver.VerStr(),
@@ -543,12 +543,12 @@ cw::fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
else if(has_conflicts)
fragments.push_back(wrapbox(cw::fragf(_("The following packages conflict with version %B%s%b of %B%s%b, and will be broken if it is %s."),
instver.VerStr(),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
actionname)));
else if(has_depends)
fragments.push_back(wrapbox(cw::fragf(_("The following packages depend on version %B%s%b of %B%s%b, and will be broken if it is %s."),
pkg.CurrentVer().VerStr(),
- pkg.Name(),
+ pkg.FullName(true).c_str(),
actionname)));
}
}