[setup] Inaccurate message: See /setup.log.full
Igor Pechtchanski
pechtcha@cs.nyu.edu
Sat Jan 25 03:22:00 GMT 2003
On Thu, 23 Jan 2003, Igor Pechtchanski wrote:
> [snip]
>
> And I just realized that with all the code I quoted in the past two
> messages, I might as well have written a patch... *g* Oh, well.
And here's that patch. Just for the fun of it... *g*
Igor
ChangeLog:
2002-10-17 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* res.rc (IDS_INSTALL_INCOMPLETE): Change hard-coded
log filename to %s.
* LogFile.cc (LogFile::exit): Pass log filename for
LOG_BABBLE to note().
(LogFile::getFile): New function.
* LogFile.h (LogFile::getFile): New function.
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
-------------- next part --------------
Index: LogFile.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/LogFile.cc,v
retrieving revision 2.6
diff -u -p -r2.6 LogFile.cc
--- LogFile.cc 25 Nov 2002 00:41:24 -0000 2.6
+++ LogFile.cc 25 Jan 2003 03:10:41 -0000
@@ -31,6 +31,7 @@ static const char *cvsid =
#include <time.h>
#include <string>
#include "AntiVirus.h"
+#include "mount.h"
using namespace std;
@@ -101,6 +102,20 @@ LogFile::setFile (int minlevel, String c
files.insert (t);
}
+static String bad_file = "the log";
+
+String const &
+LogFile::getFile (int minlevel) const
+{
+ for (FileSet::iterator i = files.begin();
+ i != files.end(); ++i)
+ {
+ if (i->level == minlevel)
+ return i->key;
+ }
+ return bad_file;
+}
+
void
LogFile::exit (int const exit_code)
{
@@ -114,8 +129,9 @@ LogFile::exit (int const exit_code)
#endif
been_here = 1;
+ String log_full = cygpath(getFile(LOG_BABBLE));
if (exit_msg)
- note (NULL, exit_msg);
+ note (NULL, exit_msg, log_full.cstr_oneuse());
log (LOG_TIMESTAMP) << "Ending cygwin install" << endLog;
Index: LogFile.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/LogFile.h,v
retrieving revision 2.3
diff -u -p -r2.3 LogFile.h
--- LogFile.h 10 Nov 2002 03:56:05 -0000 2.3
+++ LogFile.h 25 Jan 2003 03:10:41 -0000
@@ -23,6 +23,7 @@ public:
LogFile();
void clearFiles(); // delete all target filenames
void setFile (int minlevel, String const &path, bool append);
+ String const & getFile (int minlevel) const;
/* Some platforms don't call destructors. So this call exists
* which guarantees to flush any log data...
* but doesn't call generic C++ destructors
Index: res.rc
===================================================================
RCS file: /cvs/cygwin-apps/setup/res.rc,v
retrieving revision 2.45
diff -u -p -r2.45 res.rc
--- res.rc 19 Jan 2003 20:31:53 -0000 2.45
+++ res.rc 25 Jan 2003 03:11:05 -0000
@@ -483,7 +483,7 @@ BEGIN
IDS_DOWNLOAD_FAILED "Unable to download %s"
IDS_DOWNLOAD_INCOMPLETE "Download Incomplete. Try again?"
IDS_INSTALL_ERROR "Installation error (%s), Continue with other packages?"
- IDS_INSTALL_INCOMPLETE "Installation incomplete. Check /setup.log.full for details"
+ IDS_INSTALL_INCOMPLETE "Installation incomplete. Check %s for details"
IDS_VERSION_INFO "Setup.exe version %1"
IDS_CYGWIN_SETUP "Cygwin Setup"
IDS_CYGWIN_SETUP_WITH_PROGRESS "%1!d!%% - Cygwin Setup"
More information about the Cygwin-apps
mailing list