core/prt-get/prt-get-0.5.11-deptree-alias.diff

41 lines
1.3 KiB
Diff

--- prt-get-0.5.11/src/prtget.cpp 2005-06-01 22:33:43.000000000 +0200
+++ prt-get-0.5.11.new/src/prtget.cpp 2006-03-15 10:07:38.000000000 +0100
@@ -1786,8 +1785,11 @@
list<string> deps;
StringHelper::split(package->dependencies(), ',', deps);
list<string>::iterator it = deps.begin();
+ bool isAlias = false;
+ string aliasName = "";
+
for (; it != deps.end(); ++it) {
- if ( m_pkgDB->isInstalled( *it ) ) {
+ if ( m_pkgDB->isInstalled( *it, true, &isAlias, &aliasName ) ) {
cout << "[i] ";
} else {
cout << "[ ] ";
@@ -1796,6 +1798,9 @@
cout << " ";
}
cout << *it;
+ if (isAlias) {
+ cout << " (provided by " << aliasName << ")";
+ }
const Package* p = m_repo->getPackage( *it );
if (p) {
if (p->dependencies().length() > 0) {
Index: pkgdb.cpp
===================================================================
--- prt-get-0.5.11/src/pkgdb.cpp (revision 1137)
+++ prt-get-0.5.11/src/pkgdb.cpp (working copy)
@@ -68,6 +68,10 @@
*aliasOrignalName = provider;
}
}
+ } else {
+ if (isAlias) {
+ *isAlias = false;
+ }
}
return installed;