Check-in [7357a0fcfc]
Overview
Comment:Updated to normalize "noarch" and not error out for all packages if one cannot be normalized
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7357a0fcfcb8b2db3a9ad822e5871e88f121f228
User & Date: rkeene on 2014-11-05 21:15:29
Other Links: manifest | tags
Context
2014-11-05
21:41
Added "package" command back, needed for older versions of "http" package check-in: b1167b6699 user: rkeene tags: trunk
21:15
Updated to normalize "noarch" and not error out for all packages if one cannot be normalized check-in: 7357a0fcfc user: rkeene tags: trunk
18:39
Cleanup and updated to use a random filename check-in: 83a6196bd7 user: rkeene tags: trunk
Changes

Modified appfsd.tcl from [7c607fdb04] to [e521e020ce].

96
97
98
99
100
101
102



103
104
105
106
107
108
109
...
110
111
112
113
114
115
116



117
118
119
120
121
122
123
...
215
216
217
218
219
220
221

222
223
224
225
226
227
228



229
230
231
232
233
234
235
		switch -- $os {
			"linux" - "freebsd" - "openbsd" - "netbsd" {
				return $os
			}
			"sunos" {
				return "solaris"
			}



		}

		return -code error "Unable to normalize OS: $os"
	}

	proc _normalizeCPU {cpu} {
		set cpu [string tolower [string trim $cpu]]
................................................................................

		switch -glob -- $cpu {
			"i?86" {
				return "ix86"
			}
			"x86_64" {
				return $cpu



			}
		}

		return -code error "Unable to normalize CPU: $cpu"
	}

	proc init {} {
................................................................................
			if {$line == ""} {
				continue
			}

			set work [split $line ","]

			unset -nocomplain pkgInfo

			set pkgInfo(package)  [lindex $work 0]
			set pkgInfo(version)  [lindex $work 1]
			set pkgInfo(os)       [_normalizeOS [lindex $work 2]]
			set pkgInfo(cpuArch)  [_normalizeCPU [lindex $work 3]]
			set pkgInfo(hash)     [string tolower [lindex $work 4]]
			set pkgInfo(hash_type) "sha1"
			set pkgInfo(isLatest) [expr {!![lindex $work 5]}]




			if {![_isHash $pkgInfo(hash)]} {
				continue
			}

			lappend curr_packages $pkgInfo(hash)








>
>
>







 







>
>
>







 







>
|
|
|
|
|
|
|
>
>
>







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
		switch -- $os {
			"linux" - "freebsd" - "openbsd" - "netbsd" {
				return $os
			}
			"sunos" {
				return "solaris"
			}
			"noarch" - "none" - "any" - "all" {
				return "noarch"
			}
		}

		return -code error "Unable to normalize OS: $os"
	}

	proc _normalizeCPU {cpu} {
		set cpu [string tolower [string trim $cpu]]
................................................................................

		switch -glob -- $cpu {
			"i?86" {
				return "ix86"
			}
			"x86_64" {
				return $cpu
			}
			"noarch" - "none" - "any" - "all" {
				return "noarch"
			}
		}

		return -code error "Unable to normalize CPU: $cpu"
	}

	proc init {} {
................................................................................
			if {$line == ""} {
				continue
			}

			set work [split $line ","]

			unset -nocomplain pkgInfo
			if {[catch {
				set pkgInfo(package)  [lindex $work 0]
				set pkgInfo(version)  [lindex $work 1]
				set pkgInfo(os)       [_normalizeOS [lindex $work 2]]
				set pkgInfo(cpuArch)  [_normalizeCPU [lindex $work 3]]
				set pkgInfo(hash)     [string tolower [lindex $work 4]]
				set pkgInfo(hash_type) "sha1"
				set pkgInfo(isLatest) [expr {!![lindex $work 5]}]
			}]} {
				continue
			}

			if {![_isHash $pkgInfo(hash)]} {
				continue
			}

			lappend curr_packages $pkgInfo(hash)