Index: client/1.0/neutral/pkgd.eagle ================================================================== --- client/1.0/neutral/pkgd.eagle +++ client/1.0/neutral/pkgd.eagle @@ -1529,10 +1529,32 @@ } return $result } + # + # NOTE: This procedure attempts to extract a package version information + # from the specified file. The fileName argument is the local file + # name to read. This procedure may raise script errors. + # + proc extractVersionFromFile { fileName } { + switch -exact -- [file tail $fileName] { + VERSION { + return [string trim [readFile $fileName]] + } + pkgIndex.eagle - + pkgIndex.tcl { + # + # TODO: Evaluate the package index file in a new "safe" + # interpreter and obtain the newly added [package + # ifneeded] version(s)? + # + return "" + } + } + } + # # NOTE: This procedure checks if there is a higher version available of the # specified package on the package file server. The language argument # must be one of the literal strings "eagle", "tcl", or "client". The # version argument must be one of the literal strings "8.4", "8.5", or @@ -1580,12 +1602,12 @@ } set localFileName [file join $persistentDirectory $fileName] set compare [package vcompare \ - [string trim [readFile $downloadFileName]] \ - [string trim [readFile $localFileName]]] + [extractVersionFromFile $downloadFileName] \ + [extractVersionFromFile $localFileName]] if {[isEagle]} then { file delete -recursive -- $temporaryDirectory } else { file delete -force -- $temporaryDirectory