Compare commits

...

2 Commits

3 changed files with 24 additions and 11 deletions

View File

@ -81,8 +81,8 @@ present state. That nobody bothered to propose such a dup is a clear indication
that we are not going back to non-fluid Pkgfiles anytime soon. So either our that we are not going back to non-fluid Pkgfiles anytime soon. So either our
Pkgfiles have irrevocably become "just a bit" more complex (and therefore no Pkgfiles have irrevocably become "just a bit" more complex (and therefore no
longer "simple"), or they are in fact the simplest way to accommodate the modern longer "simple"), or they are in fact the simplest way to accommodate the modern
software landscape. In the latter case, a KISS objection to any new logic in software landscape. In the latter case, a KISS objection to the corresponding
prt-get is hypocritical. In the former case, it could be argued that two logic in prt-get is hypocritical. In the former case, it could be argued that two
wrongs do not make a right, and the trend away from KISS Pkgfiles does not wrongs do not make a right, and the trend away from KISS Pkgfiles does not
justify making prt-get "just a bit" more complex. But then we would have an justify making prt-get "just a bit" more complex. But then we would have an
awkward mismatch between the capabilities of prt-get, and the ports that it awkward mismatch between the capabilities of prt-get, and the ports that it

View File

@ -159,8 +159,9 @@ InstallTransaction::install( const ArgParser* parser )
} else if ( (! m_config->preferHigher()) } else if ( (! m_config->preferHigher())
|| parser->strictDiff() || parser->strictDiff()
|| rpDiff == VersionComparator::GREATER || rpDiff == VersionComparator::GREATER
|| parser->pkgmkArgs().find(forceRebuild) != || ( parser->pkgmkArgs().find(forceRebuild) != string::npos &&
string::npos ) { find(parser->otherArgs().begin(), parser->otherArgs().end(),
it->first) != parser->otherArgs().end() ) ) {
update = true; update = true;
} else { } else {
continue; continue;
@ -334,7 +335,9 @@ const {
stat((portdir + "/Pkgfile").c_str(), &fstatData) == 0) { stat((portdir + "/Pkgfile").c_str(), &fstatData) == 0) {
time_t pkgMtime = statData.st_mtime; time_t pkgMtime = statData.st_mtime;
time_t pfMtime = fstatData.st_mtime; time_t pfMtime = fstatData.st_mtime;
if ( difftime(pkgMtime,pfMtime) > 0 ) { cmd = "/bin/true"; } if ( ( difftime(pkgMtime,pfMtime) > 0 ) and
(parser->pkgmkArgs().find("-fr") == string::npos) ) {
cmd = "/bin/true"; }
} }
string args = "-d " + parser->pkgmkArgs(); string args = "-d " + parser->pkgmkArgs();
@ -647,9 +650,8 @@ bool InstallTransaction::calcDependencies( )
if ( validPackages and (!calculateDependencies()) ) { if ( validPackages and (!calculateDependencies()) ) {
cout << "Could not resolve dependencies for this transaction" << endl; cout << "Could not resolve dependencies for this transaction" << endl;
return false;
} }
return true; return validPackages;
} }
const list<string>& InstallTransaction::ignoredPackages() const const list<string>& InstallTransaction::ignoredPackages() const

View File

@ -568,7 +568,18 @@ void PrtGet::install( bool dependencies ) {
// early exit when dependencies cannot be satisfied // early exit when dependencies cannot be satisfied
if (!depck) { return; } if (!depck) { return; }
const list<string>& deps = depTransaction.dependencies(); list<string> deps = depTransaction.dependencies();
const list< pair<string,string> >& depMissing = depTransaction.missing();
list< pair<string,string> >::const_iterator it = depMissing.begin();
// ensure that missing ports are retained for the
// post-transaction summary (FS#1843). Exempt any ports that were
// installed manually or from repos that have since been deactivated.
for (; it != depMissing.end(); ++it) {
if (! m_pkgDB->isInstalled(it->first)) {
deps.push_back(it->first);
}
}
InstallTransaction transaction( deps, m_repo, m_pkgDB, m_config ); InstallTransaction transaction( deps, m_repo, m_pkgDB, m_config );
executeTransaction( transaction ); executeTransaction( transaction );
@ -950,7 +961,7 @@ void PrtGet::evaluateResult( InstallTransaction& transaction,
} }
const list<string>& already = transaction.alreadyInstalledPackages(); const list<string>& already = transaction.alreadyInstalledPackages();
if ( already.size() && ! m_parser->depSort() ) { if ( already.size() ) {
cout << endl << "-- Packages installed before this run (ignored)" cout << endl << "-- Packages installed before this run (ignored)"
<< endl; << endl;
list<string>::const_iterator ait = already.begin(); list<string>::const_iterator ait = already.begin();
@ -1034,7 +1045,7 @@ void PrtGet::evaluateResult( InstallTransaction& transaction,
cout << endl; cout << endl;
if ( errors == 0 && !interrupted ) { if ( inst.size() && errors == 0 && !interrupted ) {
cout << "prt-get: install successful." << endl; cout << "prt-get: install successful." << endl;
} else { } else {
m_returnValue = PG_PARTIAL_INSTALL_ERROR; m_returnValue = PG_PARTIAL_INSTALL_ERROR;