prt-get: print nice summary before running addcommand (-v for details)
git-svn-id: https://crux.nu/svn/tools/prt-get/trunk@1141 0b5ae1c7-2405-0410-a7fc-ba219f786e1e
This commit is contained in:
parent
1c245401d2
commit
e4d5098bb0
@ -5,6 +5,8 @@
|
|||||||
- unlock ports on remove
|
- unlock ports on remove
|
||||||
- fix lock: previously locking would only work for ports in the ports tree
|
- fix lock: previously locking would only work for ports in the ports tree
|
||||||
- allow to remove log files of successful builds
|
- 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
|
* 0.5.11 29.05.2005 Johannes Winkelmann
|
||||||
- add --path to 'ls'
|
- add --path to 'ls'
|
||||||
|
@ -268,8 +268,10 @@ InstallTransaction::installPackage( const Package* package,
|
|||||||
if ( pkgdest != "" ) {
|
if ( pkgdest != "" ) {
|
||||||
// TODO: don't manipulate pkgdir
|
// TODO: don't manipulate pkgdir
|
||||||
pkgdir = pkgdest;
|
pkgdir = pkgdest;
|
||||||
string message = "Using PKGMK_PACKAGE_DIR: " + pkgdir;
|
string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir;
|
||||||
|
if (parser->verbose() > 0) {
|
||||||
cout << message << endl;
|
cout << message << endl;
|
||||||
|
}
|
||||||
if ( m_config->writeLog() ) {
|
if ( m_config->writeLog() ) {
|
||||||
write( fdlog, message.c_str(), message.length() );
|
write( fdlog, message.c_str(), message.length() );
|
||||||
write( fdlog, "\n", 1 );
|
write( fdlog, "\n", 1 );
|
||||||
@ -307,10 +309,27 @@ InstallTransaction::installPackage( const Package* package,
|
|||||||
commandName = "prt-cache";
|
commandName = "prt-cache";
|
||||||
}
|
}
|
||||||
|
|
||||||
string message = commandName + ": " + cmd + " " + args;
|
// - inform the user about what's happening
|
||||||
cout << message << endl;
|
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() ) {
|
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 );
|
write( fdlog, "\n", 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user