Diff

Differences From Artifact [7c607fdb04]:

To Artifact [e521e020ce]:


    96     96   		switch -- $os {
    97     97   			"linux" - "freebsd" - "openbsd" - "netbsd" {
    98     98   				return $os
    99     99   			}
   100    100   			"sunos" {
   101    101   				return "solaris"
   102    102   			}
          103  +			"noarch" - "none" - "any" - "all" {
          104  +				return "noarch"
          105  +			}
   103    106   		}
   104    107   
   105    108   		return -code error "Unable to normalize OS: $os"
   106    109   	}
   107    110   
   108    111   	proc _normalizeCPU {cpu} {
   109    112   		set cpu [string tolower [string trim $cpu]]
................................................................................
   110    113   
   111    114   		switch -glob -- $cpu {
   112    115   			"i?86" {
   113    116   				return "ix86"
   114    117   			}
   115    118   			"x86_64" {
   116    119   				return $cpu
          120  +			}
          121  +			"noarch" - "none" - "any" - "all" {
          122  +				return "noarch"
   117    123   			}
   118    124   		}
   119    125   
   120    126   		return -code error "Unable to normalize CPU: $cpu"
   121    127   	}
   122    128   
   123    129   	proc init {} {
................................................................................
   215    221   			if {$line == ""} {
   216    222   				continue
   217    223   			}
   218    224   
   219    225   			set work [split $line ","]
   220    226   
   221    227   			unset -nocomplain pkgInfo
   222         -			set pkgInfo(package)  [lindex $work 0]
   223         -			set pkgInfo(version)  [lindex $work 1]
   224         -			set pkgInfo(os)       [_normalizeOS [lindex $work 2]]
   225         -			set pkgInfo(cpuArch)  [_normalizeCPU [lindex $work 3]]
   226         -			set pkgInfo(hash)     [string tolower [lindex $work 4]]
   227         -			set pkgInfo(hash_type) "sha1"
   228         -			set pkgInfo(isLatest) [expr {!![lindex $work 5]}]
          228  +			if {[catch {
          229  +				set pkgInfo(package)  [lindex $work 0]
          230  +				set pkgInfo(version)  [lindex $work 1]
          231  +				set pkgInfo(os)       [_normalizeOS [lindex $work 2]]
          232  +				set pkgInfo(cpuArch)  [_normalizeCPU [lindex $work 3]]
          233  +				set pkgInfo(hash)     [string tolower [lindex $work 4]]
          234  +				set pkgInfo(hash_type) "sha1"
          235  +				set pkgInfo(isLatest) [expr {!![lindex $work 5]}]
          236  +			}]} {
          237  +				continue
          238  +			}
   229    239   
   230    240   			if {![_isHash $pkgInfo(hash)]} {
   231    241   				continue
   232    242   			}
   233    243   
   234    244   			lappend curr_packages $pkgInfo(hash)
   235    245