From: Damon C. <da...@tc...> - 2006-11-03 14:10:42
|
Wait a minute. How is it that the 'platform' package is not able to identify a new platform exactly? As I understand it, it probably works pretty similar to the package I wrote for my own stuff. We look at tcl_platform to pull some information and then twiddle it to make it pretty. IE: tcl_platform(byteOrder) = bigEndian tcl_platform(machine) = sun4u tcl_platform(os) = SunOS tcl_platform(osVersion) = 5.6 tcl_platform(platform) = unix tcl_platform(user) = lwv26 Becomes Solaris-sparc. Why? Because SunOS-sun4u looks stupid (thanks, Sun). So, what would platform::identifier do if it ran into Solaris and we'd never seen it before? You'd get SunOS-sun4u since the default is most likely to just return $tcl_platform(os)-$tcl_platform(machine). What does a repository do when it doesn't recognize that OS? Well, one of three things: 1. Let's say the repository really DOES have packages for Solaris, but it thinks the platform is supposed to be Solaris-sparc since that's what it is in the newest 'platform' package, but the user doesn't have that yet. The repository code could just as easily do a quick map since it knows SunOS-sun4u is really Solaris-sparc and install the correct binaries. Might even update the platform package while we're there. 2. Let's say the repository doesn't know what the hell you're talking about. The package installer could try and grab the 'platform' package first before grabbing other packages to make sure it had the latest. This would all be done on the package install side, not the repository. It's pure-Tcl, and it just uses tcl_platform, so there's no real risk of it being incompatible with the version they're running. 3. Screw it. I really don't have binaries for that platform, so you asking for them does no good anyway. This isn't that tough. Every platform, regardless of whether we've heard of it or not, is going to give us SOMETHING in tcl_platform. And if the 'platform' package has never heard of it, we're going to get a default identifier. Maybe it's the right one, maybe it's not. Either way, if we've never heard of it, chances are good it's not in our repository anyway. Damon > Hmm, there's a counterargument to that, though. As Joe points out, > the Core platform package is always likely to be obsolete on a > given installation. As such, it's likely to be the first thing > downloaded from a package repository. And if it *is* written in > Tcl, then it oughtn't to need anything extra to run from the > repository. > > Nevertheless, it feels strange to have something in the repository > that is a dependency of virtually every package there . The natural > question would arise, "why isn't this in the Core?" > > In short, there are forces pulling 'platform' into the Core, > and forces keeping it out. Perhaps the only real resolution > of this approach-avoidance conflict would be to get off our arses > and sort out "bundled packages." That way, the Core installation could > come with at least *some* platform package, and those that need to (which > might indeed be most of us) could load an updated version from the \ > repository. > > |