This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Allow EPKs without pkgadd.txt in configtool


This patch allows the config tool to accept EPK files which do not
include a pkgadd.txt license file without complaining. The presence
of this file should be optional. Approval requested for the eCos
2.0 branch since the current error message generated by wxFile::Open
is grossly misleading.

John Dallaway
eCosCentric Limited

--cut here--

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/ChangeLog,v
retrieving revision 1.32.2.6
diff -u -5 -r1.32.2.6 ChangeLog
--- ChangeLog	6 Mar 2003 12:19:58 -0000	1.32.2.6
+++ ChangeLog	7 Mar 2003 11:03:47 -0000
@@ -1,5 +1,10 @@
+2003-03-07  John Dallaway  <jld at ecoscentric dot com>
+
+	* standalone/wxwin/admindlg.cpp: Allow addition of EPKs with no
+	pkgadd.txt since this file should be optional.
+
 2003-03-06  John Dallaway  <jld at ecoscentric dot com>

 	* appsettings.cpp: Disable use of "make -j<n>" for eCos builds in
 	2.0b1 release due to problems with Cygwin 1.3.18.

Index: standalone/wxwin/admindlg.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/admindlg.cpp,v
retrieving revision 1.4.2.1
diff -u -5 -r1.4.2.1 admindlg.cpp
--- standalone/wxwin/admindlg.cpp	19 Feb 2003 09:31:33 -0000	1.4.2.1
+++ standalone/wxwin/admindlg.cpp	7 Mar 2003 11:03:58 -0000
@@ -253,11 +253,11 @@
                 strLicenseFile.Replace (wxT("/"), wxT("\\")); // forward slashes -> backslashes for Win32
 #endif
                 // read the license file
                 
                 wxFile fileLicenseFile;
-                if (fileLicenseFile.Open (strLicenseFile, wxFile::read))
+                if (fileLicenseFile.Exists (strLicenseFile) && fileLicenseFile.Open (strLicenseFile, wxFile::read))
                 {
                     //TRACE (_T("License file found at %s\n"), strLicenseFile);
                     const off_t dwLicenseLength = fileLicenseFile.Length ();
                     char* pszBuffer = new char [dwLicenseLength + 1]; // allocate a buffer
                     fileLicenseFile.Read ((void*) pszBuffer, dwLicenseLength);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]