Update of /cvsroot/fink/3rdparty/apt/apt-pkg/deb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22414
Modified Files: debsystem.cc Log Message: Only assign darwin_version if uname==darwin Index: debsystem.cc =================================================================== RCS file: /cvsroot/fink/3rdparty/apt/apt-pkg/deb/debsystem.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- debsystem.cc 4 May 2006 00:49:31 -0000 1.4 +++ debsystem.cc 4 May 2006 01:14:54 -0000 1.5 @@ -32,6 +32,7 @@ #include <CoreFoundation/CoreFoundation.h> #include <fstream> #include <sys/stat.h> +#include <string.h> extern void init_deb2(); extern void init_deb3(); @@ -62,9 +63,9 @@ static struct utsname ver; // This is static, to ensure the buffer stays around /* Determine system version */ - /* TODO - should maybe check if this is really Darwin? */ if (!uname(&ver)) { - darwin_version.version = ver.release; + if(!strcasecmp(ver.sysname, "Darwin")) + darwin_version.version = ver.release; } /* Check whether this is Mac OS X, and which version of it */ @@ -328,7 +329,8 @@ // no output file from fink-virtual-pkgs, so create one // containing some bare-essential packages. std::ofstream finkstatus(FINKSTATUSFILE); - if(macosx_version.version != 0) { + if(macosx_version.version != NULL) { + // finkinit() detected OS X finkstatus << "Package: macosx" << endl; finkstatus << "Status: install ok installed" << endl; finkstatus << "Priority: optional" << endl; @@ -339,15 +341,18 @@ finkstatus << "Description: Pseudo package representing Mac OS X" << endl; finkstatus << " Pseudo package representing Mac OS X" << endl << endl; } - finkstatus << "Package: darwin" << endl; - finkstatus << "Status: install ok installed" << endl; - finkstatus << "Priority: optional" << endl; - finkstatus << "Section: base" << endl; - finkstatus << "Maintainer: None" << endl; - finkstatus << "Source: darwin" << endl; - finkstatus << "Version: " << darwin_version.version << endl; - finkstatus << "Description: Pseudo package representing Darwin" << endl; - finkstatus << " Pseudo package representing Darwin" << endl << endl; + if(darwin_version.version != NULL) { + // finkinit() detected uname==darwin + finkstatus << "Package: darwin" << endl; + finkstatus << "Status: install ok installed" << endl; + finkstatus << "Priority: optional" << endl; + finkstatus << "Section: base" << endl; + finkstatus << "Maintainer: None" << endl; + finkstatus << "Source: darwin" << endl; + finkstatus << "Version: " << darwin_version.version << endl; + finkstatus << "Description: Pseudo package representing Darwin" << endl; + finkstatus << " Pseudo package representing Darwin" << endl << endl; + } finkstatus.close(); } FinkStatusFile = new debStatusIndex(FINKSTATUSFILE); // load the file ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits