r1141 - in tools/prt-get/trunk: . src
Author: jw Date: 2006-04-04 20:50:25 +0200 (Tue, 04 Apr 2006) New Revision: 1141 Modified: tools/prt-get/trunk/ChangeLog tools/prt-get/trunk/src/installtransaction.cpp Log: prt-get: print nice summary before running addcommand (-v for details) Modified: tools/prt-get/trunk/ChangeLog =================================================================== --- tools/prt-get/trunk/ChangeLog 2006-04-04 16:30:54 UTC (rev 1140) +++ tools/prt-get/trunk/ChangeLog 2006-04-04 18:50:25 UTC (rev 1141) @@ -5,6 +5,8 @@ - unlock ports on remove - fix lock: previously locking would only work for ports in the ports tree - allow to remove log files of successful builds +- print update summary right before running the addcommand +- print full add command and PACKAGE_DIR info when using install/update -v * 0.5.11 29.05.2005 Johannes Winkelmann - add --path to 'ls' Modified: tools/prt-get/trunk/src/installtransaction.cpp =================================================================== --- tools/prt-get/trunk/src/installtransaction.cpp 2006-04-04 16:30:54 UTC (rev 1140) +++ tools/prt-get/trunk/src/installtransaction.cpp 2006-04-04 18:50:25 UTC (rev 1141) @@ -268,8 +268,10 @@ if ( pkgdest != "" ) { // TODO: don't manipulate pkgdir pkgdir = pkgdest; - string message = "Using PKGMK_PACKAGE_DIR: " + pkgdir; - cout << message << endl; + string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir; + if (parser->verbose() > 0) { + cout << message << endl; + } if ( m_config->writeLog() ) { write( fdlog, message.c_str(), message.length() ); write( fdlog, "\n", 1 ); @@ -307,10 +309,27 @@ commandName = "prt-cache"; } - string message = commandName + ": " + cmd + " " + args; - cout << message << endl; + // - inform the user about what's happening + string fullCommand = commandName + ": " + cmd + " " + args; + string summary; + if (update) { + summary = commandName + ": " + "updating " + package->name() + + " from " + m_pkgDB->getPackageVersion(package->name()) + + " to " + package->version() + "-" + package->release(); + } else { + summary = commandName + ": " + "installing " + + package->name() + " " + + package->version() + "-" + package->release(); + } + + // - print and log + cout << summary << endl; + if (parser->verbose() > 0) { + cout << fullCommand << endl; + } if ( m_config->writeLog() ) { - write( fdlog, message.c_str(), message.length() ); + write( fdlog, summary.c_str(), summary.length() ); + write( fdlog, fullCommand.c_str(), fullCommand.length() ); write( fdlog, "\n", 1 ); }
participants (1)
-
crux@crux.nu