consolidate the tests in calcDependencies()
This commit is contained in:
parent
507afd9766
commit
e67aa2cbd3
@ -656,12 +656,8 @@ bool InstallTransaction::calcDependencies( )
|
||||
m_missingPackages.push_back( make_pair( it->first, string("") ) );
|
||||
}
|
||||
}
|
||||
if ( !validPackages ) {
|
||||
cout << "No valid packages in this transaction" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !calculateDependencies() ) {
|
||||
if ( validPackages and (!calculateDependencies()) ) {
|
||||
cout << "Could not resolve dependencies for this transaction" << endl;
|
||||
return false;
|
||||
}
|
||||
|
@ -519,17 +519,16 @@ void PrtGet::listInstalled() {
|
||||
l.erase(mit);
|
||||
|
||||
InstallTransaction trans( name, m_repo, m_pkgDB, m_config );
|
||||
if ( trans.calcDependencies() ) {
|
||||
const list<string>& depRef = trans.dependencies();
|
||||
list<string>::const_iterator it = depRef.begin();
|
||||
for (; it != depRef.end(); ++it) {
|
||||
trans.calcDependencies();
|
||||
const list<string>& depRef = trans.dependencies();
|
||||
list<string>::const_iterator it = depRef.begin();
|
||||
for (; it != depRef.end(); ++it) {
|
||||
if (l.find(*it) != l.end()) {
|
||||
cout << *it << endl;
|
||||
l.erase(*it);
|
||||
}
|
||||
}
|
||||
cout << name << endl;
|
||||
} else { break; }
|
||||
}
|
||||
cout << name << endl;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user