diff --git a/src/installtransaction.cpp b/src/installtransaction.cpp index 6cc058a..232860d 100644 --- a/src/installtransaction.cpp +++ b/src/installtransaction.cpp @@ -336,11 +336,16 @@ const { time_t pkgMtime = statData.st_mtime; time_t pfMtime = fstatData.st_mtime; if ( ( difftime(pkgMtime,pfMtime) > 0 ) and - (parser->pkgmkArgs().find("-fr") == string::npos) ) { + (parser->pkgmkArgs().find(" -f") == string::npos) ) { cmd = "/bin/true"; } } string args = "-d " + parser->pkgmkArgs(); + if ( parser->pkgmkArgs().find(" -f") != string::npos && + find( parser->otherArgs().begin(), parser->otherArgs().end(), + package->name() ) == parser->otherArgs().end() ) { + StringHelper::replaceAll(args," -f",""); + } Process makeProc( cmd, args, fdlog ); if ( makeProc.executeShell() ) { result = PKGMK_FAILURE; @@ -648,8 +653,9 @@ bool InstallTransaction::calcDependencies( ) } } - if ( validPackages and (!calculateDependencies()) ) { + if ( (!validPackages) or !calculateDependencies() ) { cout << "Could not resolve dependencies for this transaction" << endl; + cout << " (dependency cycle or no valid packages)" << endl; } return validPackages; } diff --git a/src/prtget.cpp b/src/prtget.cpp index 2bd24a5..2055cd3 100644 --- a/src/prtget.cpp +++ b/src/prtget.cpp @@ -565,16 +565,19 @@ void PrtGet::install( bool dependencies ) { m_repo, m_pkgDB, m_config ); bool depck = depTransaction.calcDependencies(); - // early exit when dependencies cannot be satisfied + // early exit if no valid targets, + // or if a dependency cycle was created if (!depck) { return; } + // we have valid targets, so arrange them in the correct order list deps = depTransaction.dependencies(); + + // append all missing ports at the end of the queue, for the + // post-transaction summary (FS#1843). Exempt any ports that were + // installed manually or from repos that have since been deactivated. const list< pair >& depMissing = depTransaction.missing(); list< pair >::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);